ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The API docs of the ament_export_dependencies functions (https://github.com/ament/ament_cmake/blob/95cab1de1cd6bd7caad34d0122e11b2e86310ee2/ament_cmake_export_dependencies/cmake/ament_export_dependencies.cmake#L16-L23) describes the requirements what you can pass to it.

In your case of using Boost and requiring the component thread a simple find_package(Boost REQUIRED) call isn't sufficient. Since the API doesn't know about the COMPONENTS thread part it won't use it when downstream packages find your package and as a consequence they will fail to find the Boost thread symbols.

You will need to create a custom CMake file which finds the right component of Boost and register that file as a CONFIG_EXTRAS (see https://github.com/ament/ament_cmake/blob/95cab1de1cd6bd7caad34d0122e11b2e86310ee2/ament_cmake_core/cmake/core/ament_package.cmake#L24-L32).