merge
authorunc0rr
Fri, 01 May 2015 22:01:14 +0300
changeset 10916 2df1c53b30ea
parent 10915 c7524efcb3b7 (current diff)
parent 10911 5e3f42553ebc (diff)
child 10917 97f9a25024e6
merge
--- a/cmake_modules/paths.cmake	Fri May 01 22:23:37 2015 +0900
+++ b/cmake_modules/paths.cmake	Fri May 01 22:01:14 2015 +0300
@@ -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)