summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbiobot <[email protected]>2021-12-19 12:34:47 +0800
committerbiobot <[email protected]>2021-12-19 12:34:47 +0800
commit1a4cb99bd3e6738f79ecaf627114a0097f5b55a6 (patch)
tree7602676eb20cff836b171263d019195c3ac7593c
parentcbff24314b4fb76b2617f56d4f202389feb259fd (diff)
use ninja instead of make when generator is ninja
Signed-off-by: biobot <[email protected]>
-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