From 69e46cdc2c32df3d794a179d39f9151f43508b8d Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 28 May 2024 09:15:06 +0200 Subject: [PATCH] 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