From d107b05f379414e5c90ac903efd29dfbab6497d9 Mon Sep 17 00:00:00 2001 From: Patryk Kaminski Date: Fri, 8 Nov 2024 10:14:50 +0100 Subject: [PATCH] Add a RUNPATH to installed libraries --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0ebd1160f..76479926c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -153,6 +153,9 @@ elseif(MACOSX) endif() if(UMF_BUILD_SHARED_LIBRARY) + # Set the runtime search path to the directory containing hwloc library + set(CMAKE_INSTALL_RPATH "\$ORIGIN") + if(NOT UMF_DISABLE_HWLOC) set(HWLOC_LIB ${UMF_HWLOC_NAME}) endif()