summaryrefslogtreecommitdiff
path: root/xmake/modules/package/manager/vcpkg/install_package.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/package/manager/vcpkg/install_package.lua')
-rw-r--r--xmake/modules/package/manager/vcpkg/install_package.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/vcpkg/install_package.lua b/xmake/modules/package/manager/vcpkg/install_package.lua
index 3ee244c2f..b38fdad15 100644
--- a/xmake/modules/package/manager/vcpkg/install_package.lua
+++ b/xmake/modules/package/manager/vcpkg/install_package.lua
@@ -48,8 +48,14 @@ function main(name, opt)
arch = "x64"
end
+ -- init triplet
+ local triplet = arch .. "-" .. plat
+ if opt.plat == "windows" and opt.vs_runtime == "MT" then
+ triplet = triplet .. "-static"
+ end
+
-- init argv
- local argv = {"install", string.format("%s:%s-%s", name, arch, plat)}
+ local argv = {"install", name .. ":" .. triplet}
-- install package
os.vrunv(path.join(vcpkgdir, "vcpkg"), argv)