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.

19 lines
731 B

6 years ago
package("cjson")
6 years ago
6 years ago
set_homepage("https://github.com/DaveGamble/cJSON")
set_description("Ultralightweight JSON parser in ANSI C.")
6 years ago
set_urls("https://github.com/DaveGamble/cJSON/archive/v$(version).zip",
"https://github.com/DaveGamble/cJSON.git")
6 years ago
add_versions("1.7.10", "80a0584410656c8d8da2ba703744f44d7535fc4f0778d8bf4f980ce77c6a9f65")
6 years ago
on_install("macosx", "linux", "iphoneos", "android", function (package)
import("package.tools.make").build(package, {"static"})
6 years ago
os.cp("*.a", package:installdir("lib"))
os.cp("*.h", package:installdir("include"))
6 years ago
end)
on_test(function (package)
assert(package:has_cfuncs("cJSON_malloc", {includes = "cJSON.h"}))
end)