ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The problem only arises with catkin_make
which builds all packages in a single CMake context.
The package A needs to add the target(s) which generate the files to the following variable which will be exported through the CMake config file of the package:
list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS <your-target-name(s)-here>)
And package B needs to add a proper target dependency onto the value of the exported variable for all target which need the generated files:
add_dependency(<your-library-or-executable-target> ${a_exported_targets})