summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/cmake.lua
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2023-09-09 17:13:24 +0800
committerstar9029 <[email protected]>2023-09-09 17:13:24 +0800
commit28f26cc7a109b60519728552ff928cee84912edc (patch)
tree011c05e065b2509750c44e52ad1ed2c92400844d /xmake/modules/package/tools/cmake.lua
parente72c760f2458c93167b508ab77732bb8eec7a44c (diff)
add policy package.cmake_generator.ninja
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
-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 c0076a83c..041c240b1 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -24,6 +24,7 @@ import("core.tool.toolchain")
import("core.project.config")
import("core.tool.linker")
import("core.tool.compiler")
+import("core.project.project")
import("lib.detect.find_file")
import("lib.detect.find_tool")
import("package.tools.ninja")
@@ -987,6 +988,9 @@ function install(package, configs, opt)
-- init options
opt = opt or {}
+ if (not opt.cmake_generator) and project.policy("package.cmake_generator.ninja") then
+ opt.cmake_generator = "Ninja"
+ end
-- enter build directory
local buildir = opt.buildir or package:buildir()