orocos-toolchain/rtt — pull request #47 by snrkiwi (2014-07-08 18:51:20+00:00)
Title: cmake: Fix OS X RPATH issue with CMake 3.0

CMake 3.0 defaults on RPATH support and in conjunction with a bug
in the system install_name_tool, causes corrupt libraries and
executables.

This sets the RPATH correclty on OS X w/ CMake 3.0, and omits the
explicit RPATH entry for the install path. The install path is
automatically (and silently) added by CMake itself, which was
causing duplicate RPATH entries which excited the bug in
install_name_tool.

Tested on
- OS X 10.8.5 w/ CMake 3.0.0 and XCode 5.1.1
- OS X 10.8.5 w/ CMake 2.8.12 and XCode 5.1.1
- Linux Mint 15 w/ CMake 2.8.12 and gcc/g++ 4.8.2.