From a0dfaf3aec07cf0c14e3eb81ffe00f69864d90da Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 13 Jun 2023 23:05:14 +0800 Subject: fix pass vs_runtime in tools.xmake --- xmake/modules/package/tools/xmake.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) -- cgit v1.3.1