# HG changeset patch # User vittorio.giovara@gmail.com # Date 1430155318 0 # Node ID 5e3f42553ebc486526e49f02e846158b172fbda5 # Parent df11dea7470112250093d98fea668dfa8ec37e34 Do not set rpath when binaries are installed in the standard search path $ rpmlint hedgewars hedgewars.i686: E: binary-or-shlib-defines-rpath /usr/bin/hwengine ['$ORIGIN/../lib/', '$ORIGIN/', '/usr/lib/'] hedgewars.i686: E: binary-or-shlib-defines-rpath /usr/lib/libphyslayer.so ['$ORIGIN/../lib/', '$ORIGIN/', '/usr/lib/'] hedgewars.i686: E: binary-or-shlib-defines-rpath /usr/bin/hedgewars ['$ORIGIN/../lib/', '$ORIGIN/', '/usr/lib/'] diff -r df11dea74701 -r 5e3f42553ebc cmake_modules/paths.cmake --- 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)