From 0e83af511c25c3fd43c44d8470d0a31a07865953 Mon Sep 17 00:00:00 2001 From: Steffen Planthaber Date: Mon, 11 Oct 2021 10:23:18 +0200 Subject: [PATCH] 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. Signed-off-by: Steffen Planthaber --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d382910..3d691fa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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} )