summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-06-13 23:05:14 +0800
committerruki <[email protected]>2023-06-13 23:05:14 +0800
commita0dfaf3aec07cf0c14e3eb81ffe00f69864d90da (patch)
tree50cb419fbd15be3e5a35ab5692c5b24de47c5bfd
parentf7d35cbf580235d58bc717c853524b96a7bd4f1a (diff)
fix pass vs_runtime in tools.xmake
-rw-r--r--xmake/modules/package/tools/xmake.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua
index e253fee16..7d82ec989 100644
--- a/xmake/modules/package/tools/xmake.lua
+++ b/xmake/modules/package/tools/xmake.lua
@@ -70,13 +70,18 @@ end
-- get configs for windows
function _get_configs_for_windows(package, configs, opt)
- local names = {"vs", "vs_toolset", "vs_runtime"}
+ local names = {"vs", "vs_toolset"}
for _, name in ipairs(names) do
local value = get_config(name)
if value ~= nil then
table.insert(configs, "--" .. name .. "=" .. tostring(value))
end
end
+ -- pass vs_runtime from package configs
+ local vs_runtime = package:config("vs_runtime")
+ if vs_runtime then
+ table.insert(configs, "--vs_runtime=" .. vs_runtime)
+ end
_get_configs_for_qt(package, configs, opt)
_get_configs_for_vcpkg(package, configs, opt)