Skip to content
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

Build errors when using the USE_SYSTEM_BOOST cmake option. #82

Closed
est77 opened this issue Jun 4, 2021 · 5 comments · Fixed by #83
Closed

Build errors when using the USE_SYSTEM_BOOST cmake option. #82

est77 opened this issue Jun 4, 2021 · 5 comments · Fixed by #83

Comments

@est77
Copy link

est77 commented Jun 4, 2021

In CMakeLists.txt, target_link_boost function the correct target names for Boost libraries found by FindBoost()
are Boost::system, Boost::filesystem and Boost::thread.

The current values used ${Boost_XXX_LIBRARY} are not defined and as a result boost includes and libraries are not added to the compiler command line.

@ilelann
Copy link
Contributor

ilelann commented Jun 30, 2021

I don't reproduce that.
On a recent Fedora, with dnf install boost-devel done before, I can successfully do :

git clone https://github.com/stlab/adobe_source_libraries.git && mkdir build && cd build && cmake -DUSE_SYSTEM_BOOST=ON ../adobe_source_libraries && make -j && ctest

I miss something ?

@est77
Copy link
Author

est77 commented Jun 30, 2021

Maybe it depends on CMake's version? I am using 3.17.3 here.

In recent FindBoost versions, targets are defined as Boost::library_name and the old ${Boost_XXX_LIBRARY} vars seems not be defined.
As a result I have missing include paths and library paths when trying to build.

@ilelann
Copy link
Contributor

ilelann commented Jun 30, 2021

cmake version 3.20.5

Note that according to https://cmake.org/cmake/help/latest/module/FindBoost.html Boost_<COMPONENT>_LIBRARY are defined in latest version.
I checked locally with CMake's message, they are definitely pointing to correct .so files.
But they are not "targets".

I tested with Boost::xxx targets. it works for me.
I guess we should switch to the new target version because it covers include paths too.
Current CMakeLists.txt only links .so names, which is enough in most Linux setups since include and lib paths are not really required.

@est77
Copy link
Author

est77 commented Jun 30, 2021

Thanks for the PR!

@camio camio closed this as completed in #83 Jul 11, 2022
@camio
Copy link
Contributor

camio commented Jul 11, 2022

Verified that #83 fixes this issue and merged it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants