Bladeren bron

Zycore c add v1.1.0 (#1279)

* add package: zycore-c

* add shared option for zycore-c

* add v1.1.0

* zycore convert encoding in v1.1.0

* fix typo
yszhou2019 3 jaren geleden
bovenliggende
commit
a612969d76
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  1. 6 0
      packages/z/zycore-c/xmake.lua

+ 6 - 0
packages/z/zycore-c/xmake.lua

@@ -5,13 +5,19 @@ package("zycore-c")
 
     add_urls("https://github.com/zyantific/zycore-c/archive/refs/tags/$(version).tar.gz",
              "https://github.com/zyantific/zycore-c.git")
+    add_versions("v1.1.0", "b5496779b95206763980aad30db10e36a13a10ebaf2e74574cddf2ca744ad227")
     add_versions("v1.0.0", "aa93d6da992953693754834c130ce193980b7d7137ea2d41c2c1f618c65e4545")
 
     add_deps("cmake")
 
     on_install(function (package)
+        if package:version():eq("v1.1.0") and package:is_plat("mingw") then
+            local rc_str = io.readfile("resources/VersionInfo.rc", {encoding = "utf16le"})
+            io.writefile("resources/VersionInfo.rc", rc_str, {encoding = "utf8"})
+        end
         local configs = {}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
+        table.insert(configs, "-DZYCORE_BUILD_SHARED_LIB=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         import("package.tools.cmake").install(package, configs)
     end)