Skip to content

Commit

Permalink
Export external dependencies in FCL_LIBRARIES
Browse files Browse the repository at this point in the history
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:

moveit/moveit#2804 (comment)

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
  • Loading branch information
mintar committed Aug 17, 2021
1 parent 7fcdc7f commit 7e0567f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fcl-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7e0567f

Please sign in to comment.