Skip to content

Commit d2d6a80

Browse files
committed
Use boost library names instead of Boost_LIBRARIES var for .pc file generation
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.
1 parent 899c4af commit d2d6a80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ endif()
6363
if(NOT catkin_FOUND)
6464
set(TARGET_NAME ${PROJECT_NAME})
6565
set(PKGCONFIG_LIBS
66-
${Boost_LIBRARIES}
66+
boost_thread boost_system
6767
${console_bridge_LIBRARIES}
6868
${Poco_LIBRARIES}
6969
)

0 commit comments

Comments
 (0)