From 30acc83bfd69b4a37c80cee9a9ff70cefcac1bba Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Thu, 16 May 2024 12:37:11 +0200 Subject: [PATCH 1/2] rpath: brin back setting rpath for not apple, use ORIGIN --- cmakemodules/ilcsoft_default_rpath_settings.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmakemodules/ilcsoft_default_rpath_settings.cmake b/cmakemodules/ilcsoft_default_rpath_settings.cmake index 3a6663e..61635f1 100644 --- a/cmakemodules/ilcsoft_default_rpath_settings.cmake +++ b/cmakemodules/ilcsoft_default_rpath_settings.cmake @@ -15,6 +15,8 @@ if(APPLE) set(CMAKE_INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR}") endif("${isSystemDir}" STREQUAL "-1") else() + 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() From f08e740a91345221accf0dbf378428eb7226c8e5 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 28 May 2024 09:15:06 +0200 Subject: [PATCH 2/2] Make sure RPATH is set to the correct directory Co-authored-by: Andre Sailer --- cmakemodules/ilcsoft_default_rpath_settings.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmakemodules/ilcsoft_default_rpath_settings.cmake b/cmakemodules/ilcsoft_default_rpath_settings.cmake index 61635f1..9191598 100644 --- a/cmakemodules/ilcsoft_default_rpath_settings.cmake +++ b/cmakemodules/ilcsoft_default_rpath_settings.cmake @@ -15,6 +15,9 @@ 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