From 151998405503c71004ef7e6642c6d2dbd94fd39b Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 21 Sep 2020 22:47:54 +0800 Subject: improve msys generator --- xmake/modules/package/tools/cmake.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1