ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I found a few other answers that hint at the solution. This is what I finally came up with that works:
I created a file my_package-extras.cmake.em
that exports CMake variables that point to all of the binary files that I plan to use during the build of another Catkin project. This file detects whether we are doing a devel build or an install build---and sets the paths appropriately---by checking whether my_package_SOURCE_DIR
is defined.
Finally, I added the option CFG_EXTRAS my_package-extras.cmake
to the catkin_package()
call. This file will be included in any CMake files that find_package(my_package)
. Therefore, those CMake files can use the variables defined in that file to depend on (to insure that its built) and call the binaries exported by my_package
.