Browse Source

Update reflect-cpp to v0.16.0 (#5869)

* Update reflect-cpp to v0.16.0

* Update xmake.lua

---------

Co-authored-by: mirage-alchemy <[email protected]>
Co-authored-by: star9029 <[email protected]>
mirageAlchemy 9 months ago
parent
commit
2a84faea43
1 changed files with 15 additions and 3 deletions
  1. 15 3
      packages/r/reflect-cpp/xmake.lua

+ 15 - 3
packages/r/reflect-cpp/xmake.lua

@@ -4,8 +4,9 @@ package("reflect-cpp")
     set_license("MIT")
 
     add_urls("https://github.com/getml/reflect-cpp/archive/refs/tags/$(version).tar.gz",
-             "https://github.com/getml/reflect-cpp.git")
+             "https://github.com/getml/reflect-cpp.git", {submodules = false})
 
+    add_versions("v0.16.0", "a84d94dbd353d788926d6e54507b44c046863f7bc4ecb35afe0338374a68a77d")
     add_versions("v0.14.1", "639aec9d33025703a58d32c231ab1ab474c0cc4fb0ff90eadcaffb49271c41cd")
     add_versions("v0.14.0", "ea92a2460a71184b7d4fa4e9baad9910efad092df78b114459a7d6b0ee558d3c")
     add_versions("v0.13.0", "a7a31832fe8bbaa7f7299da46dfd4ccc8b99a13242e16a1d93f8669de1fca9c6")
@@ -24,6 +25,10 @@ package("reflect-cpp")
     add_configs("xml", {description = "Enable Xml Support.", default = false, type = "boolean"})
     add_configs("toml", {description = "Enable Toml Support.", default = false, type = "boolean"})
     add_configs("yaml", {description = "Enable Yaml Support.", default = false, type = "boolean"})
+    add_configs("ubjson", {description = "Enable UBJSON Support.", default = false, type = "boolean"})
+    if is_plat("windows") then
+        add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
+    end
 
     on_check(function (package)
         if package:is_plat("windows") then
@@ -65,13 +70,17 @@ package("reflect-cpp")
         end
 
         if package:config("toml") then
-            package:add("deps", "tomlcpp")
+            package:add("deps", "toml++")
         end
 
         if package:config("yaml") then
             package:add("deps", "yaml-cpp")
         end
 
+        if package:config("ubjson") then
+            package:add("deps", "jsoncons")
+        end
+
         local version = package:version()
         if version then
             if version:lt("0.13.0") then
@@ -94,7 +103,10 @@ package("reflect-cpp")
     on_install(function (package)
         local version = package:version()
         if package:gitref() or version:lt("0.11.1") or version:ge("0.13.0") then
-            local configs = {"-DREFLECTCPP_USE_BUNDLED_DEPENDENCIES=OFF"}
+            local configs = {
+                "-DREFLECTCPP_USE_BUNDLED_DEPENDENCIES=OFF",
+                "-DREFLECTCPP_USE_VCPKG=OFF",
+            }
             table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
             table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
             import("package.tools.cmake").install(package, configs)