Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

find_package(PCL 1.7 REQUIRED) will find the PCL libraries, but it doesn't automatically compile or link against them. Instead, it sets cmake variables with the appropriate flags for using PCL: ${PCL_INCLUDE_DIRS} and ${PCL_LIBRARIES}.

You have to explicitly link against PCL with target_link_libraries():

target_link_libraries(my_library ${PCL_LIBRARIES})

Similarly, the libraries that you find through catkin are collected in ${catkin_LIBRARIES}, and you should link against those as well:

target_link_libraries(my_library ${catkin_LIBRARIES})