From bd2a28f2bbb01cd730cb2dfdd3ae39860394318e Mon Sep 17 00:00:00 2001 From: star9029 Date: Fri, 29 Nov 2024 12:23:55 +0800 Subject: [PATCH] zstd: fix downstream Findzstd.cmake --- packages/z/zstd/xmake.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/z/zstd/xmake.lua b/packages/z/zstd/xmake.lua index 33f8c6571..db4eeeaef 100644 --- a/packages/z/zstd/xmake.lua +++ b/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)