ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The ROS CMake macros were never intended to be used like this. I don't think there is a clean way that doesn't require hacking the CMake macros for solving your case.
Instead of adding your stack using add_subdirectory
, you could execute make in that directory using something like add_custom_command
. If your ROS packages create messages or libraries, you'll then have to add the include paths and libraries by hand in your CMakeFile.txt. Note that you'll still be required to have ROS installed and your project or at least your stacks inside it need to be in the ROS_PACKAGE_PATH.