Oh, and for reference, it's this code block: ################# RPATH handling ##################################
if(NOT KDE_SKIP_RPATH_SETTINGS) # Set the default RPATH to point to useful locations, namely where the # libraries will be installed and the linker search path if(NOT LIB_INSTALL_DIR) message(FATAL_ERROR "LIB_INSTALL_DIR not set. This is necessary for using the RPATH settings.") endif() set(_abs_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}") if (NOT IS_ABSOLUTE "${_abs_LIB_INSTALL_DIR}") set(_abs_LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}") endif() if (UNIX) # for mac os: add install name dir in addition # check: is the rpath stuff below really required on mac os? at least it seems so to use a stock qt from qt.io if (APPLE) set(CMAKE_INSTALL_NAME_DIR ${_abs_LIB_INSTALL_DIR}) endif () # add our LIB_INSTALL_DIR to the RPATH (but only when it is not one of # the standard system link directories - such as /usr/lib on UNIX) list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${_abs_LIB_INSTALL_DIR}" _isSystemLibDir) list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${_abs_LIB_INSTALL_DIR}" _isSystemCxxLibDir) list(FIND CMAKE_C_IMPLICIT_LINK_DIRECTORIES "${_abs_LIB_INSTALL_DIR}" _isSystemCLibDir) if("${_isSystemLibDir}" STREQUAL "-1" AND "${_isSystemCxxLibDir}" STREQUAL "-1" AND "${_isSystemCLibDir}" STREQUAL "-1") set(CMAKE_INSTALL_RPATH "${_abs_LIB_INSTALL_DIR}") endif() # Append directories in the linker search path (but outside the project) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) endif (UNIX) endif() -- Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake