orocos-toolchain/rtt — pull request #19 by meyerj (2013-12-06 15:40:48+00:00)
Title: UseOROCOS-RTT: auto linking and rosbuild detection updates

I cherry-picked @jbohren's patch from https://github.com/jhu-lcsr-forks/rtt/commit/a244593786bce8a6d0fa3ecd767b44f241b1ae49 with slight modifications to disable auto-linking with or prevent pollution of the `USE_OROCOS_*` variables with targets from non-Orocos packages that have been `find_package()`d through some other means.

The third patch adds the `OROCOS_NO_AUTO_LINKING` variable on the cache for all kind of build-types and allows the user to overwrite it, if he wants to do so for some reason. The `UseOROCOS-RTT.cmake` script will also check the `ORO_USE_ROSBUILD` variable now and enforce rosbuild-style building if it is set to true, even if `rosbuild_init()` is not explicitly called by the user. This is for improved backwards compatibility to toolchain 2.6.

In toolchain 2.6 rosbuild-style was selected only based on the presence of the `ROS_ROOT` environment variable. But this is not possible anymore as it will also be defined for catkin builds. On the other hand, `catkin_FOUND` is also true in rosbuild packages after `rosbuild_init()` has been called as rosbuild is using catkin internally.

*Note:* You can enforce rosbuild-style building now by adding this extra line to the default Makefile generated by `orocreate-pkg` without modification of the CMakeLists.txt file:
```make
EXTRA_CMAKE_FLAGS=-DORO_USE_ROSBUILD=True
include $(shell rospack find mk)/cmake.mk
```