My ROS package has been taking longer and longer to compile, so I decided to move all msg/srv/cfg into a separate package. Here's the partial folder structure:
catkin_ws
src
mycode_core
cfg
MyCode.cfg
mycode
src
MyCode.cpp
The 'mycode' package lists mycode_core as both a compile-time and run-time dependency, and the CMakeLists.txt is configured correspondingly. In mycode/CMakeLists.txt, I'm currently specifying the include dir for the generated cfg headers manually:
include_directories( <...> ${mycode_core_PACKAGE_PATH}/cfg/cpp )
This seems quite inelegant. So I'm wondering if there is a better / recommended approach?
1. manually specify include dir (as described above)
2. in mycode_core/CMakeLists.txt, manually mark cfg/cpp/ headers to be installed under ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
3. do not separate dynamic_reconfigure cfgs into a separate package
4. something else?
↧