Skip to content

boost: Link Python when boost_python is fetched #6447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions packages/b/boost/fetch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,25 @@ function main(package, opt)
local found
libs.for_each(function (libname)
local sub_libs = sub_libs_map[libname]
if sub_libs then
for _, sub_libname in ipairs(sub_libs) do
local linkinfo = find_library("boost_" .. sub_libname, paths, opt)
if linkinfo then
_add_info(linkinfo, result)
found = true
end
end
else
local linkinfo = find_library("boost_" .. libname, paths, opt)
for _, sub_libname in ipairs(sub_libs or {libname}) do
local linkinfo = find_library("boost_" .. sub_libname, paths, opt)
if linkinfo then
_add_info(linkinfo, result)
found = true
end
end
end)

-- Link python if boost_python is found
for _, libname in ipairs(sub_libs_map.python or {}) do
if libname:startswith("python") and table.contains(result.links, "boost_" .. libname) then
local py_linkinfo = find_library("python3", paths) or find_library("python", paths)
if py_linkinfo then
_add_info(py_linkinfo, result)
end
end
end

if found then
result.linkdirs = table.unique(result.linkdirs)
return result
Expand Down
Loading