Skip to content

Commit a56846b

Browse files
authored
fix boost (#5000)
1 parent 7c1c391 commit a56846b

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

packages/b/boost/xmake.lua

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -278,22 +278,25 @@ package("boost")
278278
end
279279

280280
local function config_deppath(file, depname, rule)
281-
local dep = package:dep(depname)
282-
local info = dep:fetch({external = false})
283-
if info then
284-
local includedirs = table.wrap(info.sysincludedirs or info.includedirs)
285-
if #includedirs != 0 then
286-
for i, dir in ipairs(includedirs) do
287-
includedirs[i] = path.unix(dir)
288-
end
289-
end
290-
local usingstr = format("\nusing %s : %s : <include>%s <search>%s <name>%s ;",
291-
rule, dep:version(),
292-
table.concat(includedirs, ";"),
293-
path.unix(info.linkdirs[1]),
294-
info.links[1])
295-
file:write(usingstr)
281+
local dep = package:dep(depname)
282+
local info = dep:fetch({external = false})
283+
if info then
284+
local includedirs = table.wrap(info.sysincludedirs or info.includedirs)
285+
for i, dir in ipairs(includedirs) do
286+
includedirs[i] = path.unix(dir)
287+
end
288+
local linkdirs = table.wrap(info.linkdirs)
289+
for i, dir in ipairs(linkdirs) do
290+
linkdirs[i] = path.unix(dir)
296291
end
292+
local links = table.wrap(info.links)
293+
local usingstr = format("\nusing %s : %s : <include>%s <search>%s <name>%s ;",
294+
rule, dep:version(),
295+
table.concat(includedirs, ";"),
296+
table.concat(linkdirs, ";"),
297+
table.concat(links, ";"))
298+
file:write(usingstr)
299+
end
297300
end
298301
local file = io.open("user-config.jam", "w")
299302
if file then
@@ -456,7 +459,7 @@ package("boost")
456459
map["2"] = 2;
457460
}
458461
]]}, {configs = {languages = "c++14"}}))
459-
462+
460463
if package:config("date_time") then
461464
assert(package:check_cxxsnippets({test = [[
462465
#include <boost/date_time/gregorian/gregorian.hpp>

0 commit comments

Comments
 (0)