summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-12-19 13:50:16 +0800
committerGitHub <[email protected]>2021-12-19 13:50:16 +0800
commitfde9f472906c2b7061afa5afed4128817ffd15c1 (patch)
tree7602676eb20cff836b171263d019195c3ac7593c
parentcbff24314b4fb76b2617f56d4f202389feb259fd (diff)
parent1a4cb99bd3e6738f79ecaf627114a0097f5b55a6 (diff)
Merge pull request #1927 from Biobots/mingw-cmake
Use ninja instead of make when generator is ninja
-rw-r--r--xmake/modules/package/tools/cmake.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 1134339d0..4ced3e67d 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -378,6 +378,10 @@ function _get_configs_for_mingw(package, configs, opt)
envs.CMAKE_MAKE_PROGRAM = path.join(mingw, "bin", "mingw32-make.exe")
end
+ if opt.cmake_generator == "Ninja" then
+ envs.CMAKE_MAKE_PROGRAM = "ninja"
+ end
+
for k, v in pairs(envs) do
table.insert(configs, "-D" .. k .. "=" .. v)
end