Skip to content

Commit

Permalink
improve cmake for ninja (#6207)
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi authored Jan 21, 2025
1 parent dad864f commit 6168c84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/c/cmake/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ package("cmake")
-- xmake v3.x will enable this ninja policy by default
import("core.project.project")
if xmake.version():ge("2.9.0") and project.policy("package.cmake_generator.ninja") then
package:add("deps", "ninja")
-- We mark it as public, even if cmake is already installed,
-- we need also to install ninja and export the ninja PATH. (above xmake 2.9.8)
package:add("deps", "ninja", {public = true})
end
end)

Expand Down

0 comments on commit 6168c84

Please sign in to comment.