package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
951 B

6 years ago
package("json-c")
set_homepage("https://github.com/json-c/json-c/wiki")
set_description("JSON parser for C")
6 years ago
set_urls("https://github.com/json-c/json-c/archive/json-c-$(version)-20180305.zip")
6 years ago
6 years ago
add_versions("0.13.1", "8a244527eb4f697362f713f7d6dca3f6f9b5335e18fe7b705130ae62e599e864")
6 years ago
6 years ago
if is_plat("windows") and winos.version():gt("winxp") then
6 years ago
add_deps("cmake")
6 years ago
on_install("windows", function (package)
import("package.tools.cmake").install(package)
os.cp("json_object_iterator.h", package:installdir("include/json-c"))
6 years ago
end)
6 years ago
end
on_install("linux", "macosx", function (package)
local configs = {"--disable-dependency-tracking", "--disable-silent-rules"}
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("json_object_new_object", {includes = "json-c/json.h"}))
end)