Packages that want to use RTT always have to call find_package(OROCOS-RTT ...).
Catkin does not respect the LIBRARY_DIRS for rtt and ocl correctly when using DEPENDS, so this will not work anyway. See https://github.com/ros/catkin/issues/535.
The only option to make that work is to create a new package that calls find_package(OROCOS-RTT ... and optionally also includes the UseOrocosRTT.cmake script in one of its CFG_EXTRAS files and appends the RTT libraries to its packagename_LIBRARIES variable. This could also be integrated in rtt_ros directly.
This would allow catkin users to write very simple cmake files like this:
The only option to make that work is to create a new package that calls
find_package(OROCOS-RTT ...
and optionally also includes theUseOrocosRTT.cmake
script in one of itsCFG_EXTRAS
files and appends the RTT libraries to its packagename_LIBRARIES variable. This could also be integrated in rtt_ros directly.This would allow catkin users to write very simple cmake files like this: