Skip to content

Commit

Permalink
Use boost library names instead of Boost_LIBRARIES var for .pc file g…
Browse files Browse the repository at this point in the history
…eneration

In recent versions of FindBoost.cmake (e.g. on Ubuntu 20.04),
Boost_LIBRARIES contains the cmake targets (Boost::thread,
Boost::system) instead of library names.

pkg-config --libs class_loader retruns
[...]-lclass_loader Boost::thread\;Boost::system\;[...]

Those cannot be linked downstream when cmake is not used or
find_package(Boost) is not executed again to actually find/define the
targets.
  • Loading branch information
planthaber committed Oct 11, 2021
1 parent 899c4af commit d2d6a80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ endif()
if(NOT catkin_FOUND)
set(TARGET_NAME ${PROJECT_NAME})
set(PKGCONFIG_LIBS
${Boost_LIBRARIES}
boost_thread boost_system
${console_bridge_LIBRARIES}
${Poco_LIBRARIES}
)
Expand Down

0 comments on commit d2d6a80

Please sign in to comment.