Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Mar 2, 2024
1 parent 4988016 commit 3339efa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/d/depot_tools/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package("depot_tools")
add_versions("2024.2.29", "50de666ba40a4808daf9791fece3d8a43228a1de")

-- we use external ninja instead of depot_tools/ninja which eating ram until VM exhaustion (16GB)
add_deps("ninja", {private = true})
add_deps("ninja", {private = true, system = false})

on_load(function (package)
package:addenv("PATH", ".")
Expand All @@ -21,10 +21,9 @@ package("depot_tools")

on_install("linux", "macosx", "windows", function (package)
import("core.base.global")
local ninja = package:dep("ninja"):fetch()
print("ninja", ninja)
if ninja and ninja.program then
os.trycp(ninja.program, os.curdir())
local ninja = path.join(package:dep("ninja"):installdir("bin"), "ninja" .. (is_host("windows") and ".exe" or ""))
if ninja and os.isfile(ninja) then
os.trycp(ninja, os.curdir())
end
os.cp("*", package:installdir())
os.cd(package:installdir())
Expand Down

0 comments on commit 3339efa

Please sign in to comment.