jhu-lcsr-forks / rtt_ros_integration

Orocos-ROS integration libraries and tools
1 stars 2 forks source link

rtt_roscomm: Export include directories explicitly in GenerateRTTROSCommPackage.cmake.em #41

Closed meyerj closed 10 years ago

meyerj commented 10 years ago

This pull request requires https://github.com/orocos-toolchain/rtt/commit/60a206070f5f404be349232008904ba2be9d4054.

All required headers for using the typekit will be made available to dependent packages within the same workspace if they call use_orocos_package() without involving catkin. Otherwise it would be required to list typekit packages twice:

# This will make the foo_msgs headers available as foo_msgs is a dependency of rtt_foo_msgs
find_package(catkin REQUIRED COMPONENTS rtt_foo_msgs)
include_directories(${catkin_INCLUDE_DIRS})
# This will make the generated rtt_foo_msgs headers and typekit libraries available
orocos_use_package(rtt_foo_msgs)

With this patch, only the second block is required, while the first can be left out if they are no other catkin packages you want to depend on.

There was also a bug in GenerateRTTROSCommPackage.cmake.em as

LIST(APPEND ${${PROJECT_NAME}_EXPORTED_TARGETS} "rtt-${package}-typekit")

should have been

LIST(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS "rtt-${package}-typekit")