diff options
| author | ruki <[email protected]> | 2020-09-21 22:47:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-09-21 22:47:54 +0800 |
| commit | 151998405503c71004ef7e6642c6d2dbd94fd39b (patch) | |
| tree | 919123591e4ae6e8bab051cb8453f81f4e6e38bb /xmake/modules/package/tools/cmake.lua | |
| parent | 3d8633b429950b6605e20563f5e324ea13a037bb (diff) | |
improve msys generator
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index f3c9eb54a..03150173c 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -99,7 +99,6 @@ function _get_configs_for_mingw(package, configs) local cxxflags = table.join(table.wrap(package:build_getenv("cxflags")), package:build_getenv("cxxflags")) local sdkdir = package:build_getenv("mingw") or package:build_getenv("sdk") if is_host("windows") then - table.insert(configs, "-G" .. "MSYS Makefiles") envs.CMAKE_C_COMPILER = _translate_windows_bin_path(package:build_getenv("cc")) envs.CMAKE_CXX_COMPILER = _translate_windows_bin_path(package:build_getenv("cxx")) envs.CMAKE_ASM_COMPILER = _translate_windows_bin_path(package:build_getenv("as")) @@ -195,6 +194,9 @@ function _get_configs_for_generator(package, configs, opt) end table.insert(configs, "-G") table.insert(configs, cmake_generator) + elseif package:is_plat("mingw") and is_host("host") then + table.insert(configs, "-G") + table.insert(configs, "MSYS Makefiles") end end |
