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()