xmake.lua 521 B

123456789101112131415
  1. package("json.h")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/sheredom/json.h")
  4. set_description("single header json parser for C and C++")
  5. add_urls("https://github.com/sheredom/json.h.git")
  6. add_versions("2022.11.27", "06aa5782d650e7b46c6444c2d0a048c0a1b3a072")
  7. on_install(function (package)
  8. os.cp("*.h", package:installdir("include"))
  9. end)
  10. on_test(function (package)
  11. assert(package:has_cfuncs("json_parse", {includes = "json.h"}))
  12. end)