zstd: fix downstream Findzstd.cmake

pull/5867/head
star9029 2 weeks ago
parent 7d2820ee37
commit bd2a28f2bb
  1. 9
      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)

Loading…
Cancel
Save