Bläddra i källkod

Add extsources to nlohmann-json (#1341)

* Add extsources to nlohmann-json

* Update xmake.lua
ImperatorS79 3 år sedan
förälder
incheckning
2d7e28b212
1 ändrade filer med 8 tillägg och 0 borttagningar
  1. 8 0
      packages/n/nlohmann_json/xmake.lua

+ 8 - 0
packages/n/nlohmann_json/xmake.lua

@@ -12,6 +12,14 @@ package("nlohmann_json")
 
     add_configs("cmake", {description = "Use cmake buildsystem", default = false, type = "boolean"})
 
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::nlohmann-json")
+    elseif is_plat("linux") then
+        add_extsources("pacman::nlohmann-json", "apt::nlohmann-json3-dev")
+    elseif is_plat("macosx") then
+        add_extsources("brew::nlohmann-json")
+    end
+
     on_load(function (package)
         if package:config("cmake") then
             package:add("deps", "cmake")