cmake_modules/paths.cmake
branchqmlfrontend
changeset 10922 999d95494fe7
parent 10911 5e3f42553ebc
child 11324 ac6715709812
--- a/cmake_modules/paths.cmake	Mon May 04 17:48:57 2015 +0300
+++ b/cmake_modules/paths.cmake	Mon May 04 17:49:15 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)