summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/cmake.lua
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2024-11-26 20:00:50 +0800
committerstar9029 <[email protected]>2024-11-26 20:00:50 +0800
commit9aa0516630fbd4d6d5bdf0fe4a704b86a53350c8 (patch)
tree6a397ffbde4073622293eaa16a35fa047ff4e6a5 /xmake/modules/package/tools/cmake.lua
parent3276686e4d2356dab029d94ada8f780e0702889a (diff)
fix cmake & mingw detect cross-compilation on windows
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
-rw-r--r--xmake/modules/package/tools/cmake.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index ca01fe11a..7f2a3d397 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -580,7 +580,7 @@ function _get_configs_for_mingw(package, configs, opt)
envs.CMAKE_EXE_LINKER_FLAGS = _get_ldflags(package, opt)
envs.CMAKE_SHARED_LINKER_FLAGS = _get_shflags(package, opt)
envs.CMAKE_MODULE_LINKER_FLAGS = _get_shflags(package, opt)
- envs.CMAKE_SYSTEM_NAME = "Windows"
+ envs.CMAKE_SYSTEM_NAME = is_host("windows") and "" or "Windows"
envs.CMAKE_SYSTEM_PROCESSOR = _get_cmake_system_processor(package)
-- avoid find and add system include/library path
-- @see https://github.com/xmake-io/xmake/issues/2037