From 7e0567f12353216b5b1d425d0a07118f9d2739de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCnther?= Date: Tue, 17 Aug 2021 15:41:55 +0200 Subject: [PATCH] Export external dependencies in FCL_LIBRARIES The find_package CMake macro was missing the CCD and Octomap libraries in the FCL_LIBRARIES variable, which led to linker errors in dependent projects, for example: https://github.com/ros-planning/moveit/issues/2804#issuecomment-900311899 The old PkgConfig implementation properly adds all external dependencies, but the find_package implementation is missing some: find_package: FCL_LIBRARIES=fcl PkgConfig: FCL_LIBRARIES=/opt/ros/noetic/lib/x86_64-linux-gnu/libfcl.so;/usr/lib/x86_64-linux-gnu/libccd.so;/usr/lib/x86_64-linux-gnu/libm.so;/opt/ros/noetic/lib/liboctomap.so;/opt/ros/noetic/lib/liboctomath.so This commit will result in the following FCL_LIBRARIES: FCL_LIBRARIES=fcl;/usr/lib/x86_64-linux-gnu/libccd.so;/usr/lib/x86_64-linux-gnu/libm.so;/opt/ros/noetic/lib/liboctomap.so;/opt/ros/noetic/lib/liboctomath.so --- fcl-config.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcl-config.cmake.in b/fcl-config.cmake.in index 0bc4fe040..f97d90c41 100644 --- a/fcl-config.cmake.in +++ b/fcl-config.cmake.in @@ -6,7 +6,7 @@ set(FCL_VERSION "@FCL_VERSION@") set(FCL_ABI_VERSION "@FCL_ABI_VERSION@") set_and_check(FCL_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") -set(FCL_LIBRARIES @PROJECT_NAME@) +set(FCL_LIBRARIES @PROJECT_NAME@ @CCD_LIBRARIES@ @OCTOMAP_LIBRARIES@) set_and_check(FCL_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@") include(CMakeFindDependencyMacro)