summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/cmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-07-09 22:23:50 +0800
committerruki <[email protected]>2023-07-09 22:23:50 +0800
commitb7a82a2e449133752cca5cee2349180371999373 (patch)
tree8aaafd1fa09a9d59de7d13b84f64609cfb2b0299 /xmake/modules/package/tools/cmake.lua
parent710f14b26f29c5d6eaccdf9af197eeca4789ae35 (diff)
fix find windres #3942
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
-rw-r--r--xmake/modules/package/tools/cmake.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index f25ec2ce9..e87e9f620 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -649,7 +649,7 @@ function _get_configs_for_generator(package, configs, opt)
elseif package:is_plat("mingw") and is_subhost("windows") then
table.insert(configs, "-G")
table.insert(configs, "MinGW Makefiles")
- elseif package:is_plat("windows") then
+ elseif package:is_plat("windows") and not package:config("toolchains") then
table.insert(configs, "-G")
table.insert(configs, _get_cmake_generator_for_msvc(package))
elseif package:is_plat("wasm") and is_subhost("windows") then
@@ -685,7 +685,7 @@ function _get_configs(package, configs, opt)
opt._configs_str = string.serialize(configs, {indent = false, strip = true})
_get_configs_for_install(package, configs, opt)
_get_configs_for_generator(package, configs, opt)
- if package:is_plat("windows") then
+ if package:is_plat("windows") and not package:config("toolchains") then
_get_configs_for_windows(package, configs, opt)
elseif package:is_plat("android") then
_get_configs_for_android(package, configs, opt)
@@ -721,7 +721,7 @@ function buildenvs(package, opt)
opt = opt or {}
local envs = {}
if package:is_plat("windows") then
- envs = _get_msvc_runenvs(package)
+ -- envs = _get_msvc_runenvs(package)
end
-- we need pass pkgconf for windows/mingw without msys2/cygwin