diff --git a/cmake/os.cmake b/cmake/os.cmake index 14fc6762b7e6c94d656edc079d4b733399d9e8d5..2e8c979774a88056ece491d0ba5aee7c64a59d62 100644 --- a/cmake/os.cmake +++ b/cmake/os.cmake @@ -1,10 +1,8 @@ -## OSX/homebrew version of root6 installs its cmake macros in a non-standard -## location. This might be an issue on other systems as well. -if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} $ENV{ROOTSYS}/etc/root/cmake) -endif() - -## Get rid of rpath warning on OSX +## Set correct rpath on MacOs if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_MACOSX_RPATH 1) + set(CMAKE_INSTALL_RPATH + ${CMAKE_INSTALL_RPATH} + "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") +message("Setting RPath to ${CMAKE_INSTALL_RPATH}") endif()