Repository: thrift Updated Branches: refs/heads/master 98201b060 -> aeb89aa81
THRIFT-3103 cmake is missing RPATH on MacOSX. Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/aeb89aa8 Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/aeb89aa8 Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/aeb89aa8 Branch: refs/heads/master Commit: aeb89aa81bdd23aee2f70eabe87f44d7fb2c9c8a Parents: 98201b0 Author: Marco Molteni <[email protected]> Authored: Fri Apr 17 13:48:36 2015 +0200 Committer: Roger Meier <[email protected]> Committed: Mon Apr 20 22:31:12 2015 +0200 ---------------------------------------------------------------------- build/cmake/DefineCMakeDefaults.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/aeb89aa8/build/cmake/DefineCMakeDefaults.cmake ---------------------------------------------------------------------- diff --git a/build/cmake/DefineCMakeDefaults.cmake b/build/cmake/DefineCMakeDefaults.cmake index 2fe41d3..f41673e 100644 --- a/build/cmake/DefineCMakeDefaults.cmake +++ b/build/cmake/DefineCMakeDefaults.cmake @@ -56,3 +56,15 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +# +# "rpath" support. +# See http://www.itk.org/Wiki/index.php?title=CMake_RPATH_handling +# +# On MacOSX, for shared libraries, enable rpath support. +set(CMAKE_MACOSX_RPATH TRUE) +# +# On any OS, for executables, allow linking with shared libraries in non-system +# locations and running the executables without LD_PRELOAD or similar. +# This requires the library to be built with rpath support. +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
