Quellcode durchsuchen

zstd: fix downstream Findzstd.cmake

star9029 vor 8 Monaten
Ursprung
Commit
bd2a28f2bb
1 geänderte Dateien mit 9 neuen und 0 gelöschten Zeilen
  1. 9 0
      packages/z/zstd/xmake.lua

+ 9 - 0
packages/z/zstd/xmake.lua

@@ -49,6 +49,15 @@ package("zstd")
         table.insert(configs, "-DZSTD_BUILD_PROGRAMS=" .. (package:config("tools") and "ON" or "OFF"))
         table.insert(configs, "-DZSTD_BUILD_CONTRIB=" .. (package:config("contrib") and "ON" or "OFF"))
         import("package.tools.cmake").install(package, configs)
+
+        if package:is_plat("windows") then
+            -- Some custom Findzstd.cmake will match zstd.lib
+            local lib = package:installdir("lib/zstd_static.lib")
+            if os.isfile(lib) then
+                os.cp(lib, path.join(package:installdir("lib"), "zstd.lib"))
+                package:add("links", "zstd")
+            end
+        end
     end)
 
     on_test(function (package)