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
1.0 KiB

6 years ago
package("json-c")
set_homepage("https://github.com/json-c/json-c/wiki")
set_description("JSON parser for C")
set_license("MIT")
6 years ago
set_urls("https://github.com/json-c/json-c/archive/refs/tags/json-c-$(version).zip")
6 years ago
6 years ago
add_versions("0.13.1-20180305", "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
6 years ago
on_install("linux", "macosx", "iphoneos", "android", function (package)
local configs = {"--disable-dependency-tracking", "--disable-silent-rules", "--enable-shared=no"}
6 years ago
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)