Forráskód Böngészése

Update ormpp to v0.1.2 (#3916)

* Update spdlog to v1.14.0

* Update ormpp to v0.1.2

* Update xmake.lua to handle different versions of ormpp

* Update xmake.lua to exclude copying frozen and iguana directories during installation

* Update xmake.lua to exclude copying frozen and iguana directories during installation

* fix code

* Refactor xmake.lua to exclude copying frozen and iguana directories during installation

* Exclude copying frozen and iguana directories during installation in xmake.lua

* Update xmake.lua to include version v1.14.1 of spdlog

* Revert "Update xmake.lua to include version v1.14.1 of spdlog"

This reverts commit b662ea284ea573929da991005537a24ff3768e4c.

* Remove comments

* Update xmake.lua

* Update xmake.lua

---------

Co-authored-by: star9029 <[email protected]>
Linpeng Zhang 1 éve
szülő
commit
254a2488af
1 módosított fájl, 15 hozzáadás és 5 törlés
  1. 15 5
      packages/o/ormpp/xmake.lua

+ 15 - 5
packages/o/ormpp/xmake.lua

@@ -8,13 +8,14 @@ package("ormpp")
     set_urls("https://github.com/qicosmos/ormpp/archive/refs/tags/$(version).tar.gz",
              "https://github.com/qicosmos/ormpp.git")
 
+    add_versions("v0.1.2", "990e88eb176d996cdbbbdfa3e1522b48d135d809f14094771f8d6f02e94573c4")
     add_versions("v0.1.1", "a3c93599950a4c5822ebd0750ac7964c59c9b3f84f638525f01578bac6d898c2")
 
     add_configs("mysql", {description = "Using mysql", default = false, type = "boolean"})
     add_configs("postgresql", {description = "Using postgresql", default = false, type = "boolean"})
     add_configs("sqlite3", {description = "Using sqlite3", default = false, type = "boolean"})
 
-    on_load("windows", "macosx", "linux", function(package) 
+    on_load(function(package) 
         local configs = {
             mysql = "ORMPP_ENABLE_MYSQL",
             postgresql = "ORMPP_ENABLE_PG",
@@ -29,13 +30,22 @@ package("ormpp")
         end
     end)
 
+    add_deps("frozen", "iguana")
+
     on_install(function (package)
-        os.cp("include/*", package:installdir("include"))
-        os.cp("frozen/**", package:installdir("include/frozen"), {rootdir = "frozen"})
-        os.cp("iguana/**", package:installdir("include/iguana"), {rootdir = "iguana"})
+        if package:version():ge("0.1.2") then
+            os.vcp("ormpp/*", package:installdir("include"))
+        else
+            os.vcp("include/*", package:installdir("include"))
+        end
     end)
 
     on_test(function (package)
+        local languages = "c++17"
+        if package:is_plat("windows") and package:is_arch("arm.*") then
+            languages = "c++20"
+        end
+
         assert(package:check_cxxsnippets({test = [[
             using namespace ormpp;
             struct student {
@@ -45,5 +55,5 @@ package("ormpp")
             };
             REGISTER_AUTO_KEY(student, id)
             REFLECTION_WITH_NAME(student, "t_student", id, name, age)        
-        ]]}, {configs = {languages = "c++17"}, includes = { "dbng.hpp"} }))
+        ]]}, {configs = {languages = languages}, includes = {"dbng.hpp"} }))
     end)