Upgrade json-c to 0.17 (#4181)

* Update `json-c` to 0.17

* Remove `json-c 0.13` due to lack of CMake support
autoupdate-vulkan-memory-allocator-v3.1.0
zjyhjqs 6 months ago committed by GitHub
parent b0cf1a54d5
commit 4e91f1a60c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 20
      packages/j/json-c/xmake.lua

@ -5,19 +5,19 @@ package("json-c")
set_urls("https://github.com/json-c/json-c/archive/refs/tags/json-c-$(version).zip") set_urls("https://github.com/json-c/json-c/archive/refs/tags/json-c-$(version).zip")
add_versions("0.13.1-20180305", "8a244527eb4f697362f713f7d6dca3f6f9b5335e18fe7b705130ae62e599e864") add_versions("0.17-20230812", "471e9eb1dad4fd2e4fec571d8415993e66a89f23a5b052f1ba11b54db90252de")
if is_plat("windows") and winos.version():gt("winxp") then
add_deps("cmake") add_deps("cmake")
on_install("windows", function (package) on_install(function (package)
import("package.tools.cmake").install(package) local configs = {"-DBUILD_TESTING=OFF", "-DBUILD_APPS=OFF"}
os.cp("json_object_iterator.h", package:installdir("include/json-c")) table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
end) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DBUILD_STATIC_LIBS=" .. (package:config("shared") and "OFF" or "ON"))
if package:config("pic") ~= false then
table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
table.insert(configs, "-DDISABLE_STATIC_FPIC=OFF")
end end
import("package.tools.cmake").install(package, configs)
on_install("linux", "macosx", "iphoneos", "android", function (package)
local configs = {"--disable-dependency-tracking", "--disable-silent-rules", "--enable-shared=no"}
import("package.tools.autoconf").install(package, configs)
end) end)
on_test(function (package) on_test(function (package)

Loading…
Cancel
Save