diff options
| author | Jérôme Leclercq <[email protected]> | 2021-08-17 15:00:01 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-17 15:00:01 +0200 |
| commit | 609e349156ebb28bd1e3788c3e13e76c4ae71826 (patch) | |
| tree | dbb42a27eed79d52c5cfe33e68fa6907953984d7 /xmake/modules/package/tools/cmake.lua | |
| parent | 5322929d89183b19f115e7418ffe1fc44bcbc78b (diff) | |
Set CMAKE_MAKE_PROGRAM to mingw32-make.exe on Windows
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -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 |
