boost: fix fetch system library

pull/5000/head
star9029 3 months ago
parent 43d9b6acdd
commit ac6c846a98
  1. 10
      packages/b/boost/xmake.lua

@ -281,9 +281,17 @@ package("boost")
local dep = package:dep(depname) local dep = package:dep(depname)
local info = dep:fetch({external = false}) local info = dep:fetch({external = false})
if info then if info then
local includedirs = table.wrap(info.sysincludedirs or info.includedirs)
if #includedirs == 0 then
includedirs = ""
else
for i, dir in ipairs(includedirs) do
includedirs[i] = path.unix(dir)
end
end
local usingstr = format("\nusing %s : %s : <include>%s <search>%s <name>%s ;", local usingstr = format("\nusing %s : %s : <include>%s <search>%s <name>%s ;",
rule, dep:version(), rule, dep:version(),
path.unix(info.includedirs[1] or info.sysincludedirs[1]), table.concat(includedirs, ";"),
path.unix(info.linkdirs[1]), path.unix(info.linkdirs[1]),
info.links[1]) info.links[1])
file:write(usingstr) file:write(usingstr)

Loading…
Cancel
Save