summaryrefslogtreecommitdiff
path: root/xmake/modules/package
diff options
context:
space:
mode:
authorruki <[email protected]>2022-09-17 00:37:14 +0800
committerruki <[email protected]>2022-09-17 00:37:14 +0800
commitb3b15ca2375dbe4f39d545c988c271331caf1a26 (patch)
tree2cf0c0bdd7a4d4845d9b0b421f8b2c5eb4bdb419 /xmake/modules/package
parent6720926d362233c901f250ffa6d864169cbd7ef6 (diff)
improve triplet for vcpkg/find
Diffstat (limited to 'xmake/modules/package')
-rw-r--r--xmake/modules/package/manager/vcpkg/find_package.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/package/manager/vcpkg/find_package.lua b/xmake/modules/package/manager/vcpkg/find_package.lua
index 25893c2f3..f4a23f57d 100644
--- a/xmake/modules/package/manager/vcpkg/find_package.lua
+++ b/xmake/modules/package/manager/vcpkg/find_package.lua
@@ -73,7 +73,7 @@ function _find_package(vcpkgdir, name, opt)
local arch = opt.arch
local plat = opt.plat
local mode = opt.mode
-
+
plat = configurations.plat(plat)
arch = configurations.arch(arch)
@@ -87,11 +87,13 @@ function _find_package(vcpkgdir, name, opt)
-- find the package info file, e.g. zlib_1.2.11-3_x86-windows[-static].list
local triplet = arch .. "-" .. plat
local configs = opt.configs or {}
- if plat == "windows" and configs.shared ~= true then
+ if opt.plat == "windows" and configs.shared ~= true then
triplet = triplet .. "-static"
if configs.vs_runtime and configs.vs_runtime:startswith("MD") then
triplet = triplet .. "-md"
end
+ elseif opt.plat == "mingw" then
+ triplet = triplet .. (configs.shared ~= true and "-static" or "-dynamic")
end
local infofile = find_file(format("%s_*_%s.list", name, triplet), infodirs)
if not infofile then