diff --git a/cmakemodules/ilcsoft_default_rpath_settings.cmake b/cmakemodules/ilcsoft_default_rpath_settings.cmake index 3a6663e..9191598 100644 --- a/cmakemodules/ilcsoft_default_rpath_settings.cmake +++ b/cmakemodules/ilcsoft_default_rpath_settings.cmake @@ -15,6 +15,11 @@ if(APPLE) set(CMAKE_INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR}") endif("${isSystemDir}" STREQUAL "-1") else() + if(NOT CMAKE_INSTALL_LIBDIR) + set(CMAKE_INSTALL_LIBDIR lib) + endif() + set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}" ) + MARK_AS_ADVANCED(CMAKE_INSTALL_RPATH) set(CMAKE_SKIP_INSTALL_RPATH FALSE) # skip the full RPATH for the install tree endif()