cmake_modules/paths.cmake
changeset 10911 5e3f42553ebc
parent 10069 c4ad9c76b542
child 11329 ac6715709812
--- a/cmake_modules/paths.cmake	Sat Apr 11 17:37:43 2015 +0300
+++ b/cmake_modules/paths.cmake	Mon Apr 27 17:21:58 2015 +0000
@@ -60,11 +60,12 @@
     set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")
     #install_name_tool for libraries
     set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Frameworks")
-else(APPLE)
+else(APPLE AND NOT (${CMAKE_INSTALL_PREFIX} MATCHES "/usr"))
     #paths where to find libraries (final slash not optional):
     # - the first is relative to the executable
     # - the second is the same directory of the executable (so it runs in bin/)
     # - the third one is the full path of the system dir
     #source http://www.cmake.org/pipermail/cmake/2008-January/019290.html
+    #skip this if the install prefix is the standard one
     set(CMAKE_INSTALL_RPATH "$ORIGIN/../${target_library_install_dir}/:$ORIGIN/:${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}/")
 endif(APPLE)