diff options
| author | ruki <[email protected]> | 2021-08-17 22:47:42 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-17 22:47:42 +0800 |
| commit | 7cca87667ee4ac6e06b94e3f89cc11bde5263db5 (patch) | |
| tree | dbb42a27eed79d52c5cfe33e68fa6907953984d7 | |
| parent | 5322929d89183b19f115e7418ffe1fc44bcbc78b (diff) | |
| parent | 609e349156ebb28bd1e3788c3e13e76c4ae71826 (diff) | |
Merge pull request #1580 from SirLynix/patch-6
Set CMAKE_MAKE_PROGRAM to mingw32-make.exe on Windows
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 3e48fee40..73af75b32 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -363,6 +363,12 @@ function _get_configs_for_mingw(package, configs, opt) envs.CMAKE_OSX_SYSROOT = "" -- Avoid cmake to add the flags -search_paths_first and -headerpad_max_install_names on macOS envs.HAVE_FLAG_SEARCH_PATHS_FIRST = "0" + -- CMAKE_MAKE_PROGRAM may be required for some CMakeLists.txt (libcurl) + if is_subhost("windows") then + local mingw = assert(package:build_getenv("mingw") or package:build_getenv("sdk"), "mingw not found!") + envs.CMAKE_MAKE_PROGRAM = path.join(mingw, "bin", "mingw32-make.exe") + end + for k, v in pairs(envs) do table.insert(configs, "-D" .. k .. "=" .. v) end |
