# HG changeset patch # User unc0rr # Date 1430506874 -10800 # Node ID 2df1c53b30eaa1d5751c7292ac845f57b68717ae # Parent c7524efcb3b74e822451b3e2b5da791d85a4a2ce# Parent 5e3f42553ebc486526e49f02e846158b172fbda5 merge diff -r c7524efcb3b7 -r 2df1c53b30ea cmake_modules/paths.cmake --- 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)