summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-11 23:55:52 +0800
committerruki <[email protected]>2022-03-11 23:55:52 +0800
commitd5eb35f0c29ddb3f1944368f74315e686e7a52dd (patch)
treedf4281611ca33fb13a5f6b2b6ba26ee7b2595154
parent205f1d2ae8281955b22b868eb16741a86e44da58 (diff)
fix vcpkg install
-rw-r--r--xmake/modules/package/manager/vcpkg/install_package.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/modules/package/manager/vcpkg/install_package.lua b/xmake/modules/package/manager/vcpkg/install_package.lua
index 962c72f83..30a11f2e7 100644
--- a/xmake/modules/package/manager/vcpkg/install_package.lua
+++ b/xmake/modules/package/manager/vcpkg/install_package.lua
@@ -40,6 +40,9 @@ end
-- install for classic mode
function _install_for_classic(vcpkg, name, opt)
+ -- get configs
+ local configs = opt.configs or {}
+
-- get arch, plat and mode
local arch = opt.arch
local plat = opt.plat
@@ -51,9 +54,9 @@ function _install_for_classic(vcpkg, name, opt)
-- init triplet
local triplet = arch .. "-" .. plat
- if opt.plat == "windows" and opt.shared ~= true then
+ if opt.plat == "windows" and configs.shared ~= true then
triplet = triplet .. "-static"
- if opt.vs_runtime and opt.vs_runtime:startswith("MD") then
+ if configs.vs_runtime and configs.vs_runtime:startswith("MD") then
triplet = triplet .. "-md"
end
end
@@ -82,9 +85,9 @@ function _install_for_manifest(vcpkg, name, opt)
end
arch = configurations.arch(arch)
local triplet = arch .. "-" .. plat
- if opt.plat == "windows" and opt.shared ~= true then
+ if opt.plat == "windows" and configs.shared ~= true then
triplet = triplet .. "-static"
- if opt.vs_runtime and opt.vs_runtime:startswith("MD") then
+ if configs.vs_runtime and configs.vs_runtime:startswith("MD") then
triplet = triplet .. "-md"
end
end