Update xmake.lua

pull/725/head
ruki 3 years ago committed by GitHub
parent b3dfebb85e
commit a25f4ca811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      packages/s/spirv-tools/xmake.lua

@ -18,6 +18,26 @@ package("spirv-tools")
add_extsources("apt::spirv-tools")
end
on_fetch("macosx", function (package, opt)
if opt.system then
-- fix missing includedirs when the system library is found on macOS
local result = package:find_package("spirv-tools")
if result and not result.includedirs then
for _, linkdir in ipairs(result.linkdirs) do
if linkdir:startswith("/usr") then
local includedir = path.join(path.directory(linkdir), "include", "spirv-tools")
if os.isdir(includedir) then
includedir = path.directory(includedir)
result.includedirs = result.includedirs or {}
table.insert(result.includedirs, includedir)
end
end
end
end
return result
end
end)
on_install("linux", "windows", "macosx", function (package)
package:addenv("PATH", "bin")
local configs = {"-DSPIRV_SKIP_TESTS=ON"}

Loading…
Cancel
Save