Skip to content

Commit dccbdce

Browse files
committed
Add a RUNPATH to installed libraries
1 parent 3ab25d0 commit dccbdce

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ set(UMF_PROXY_LIB_BASED_ON_POOL
8282
set_property(CACHE UMF_PROXY_LIB_BASED_ON_POOL
8383
PROPERTY STRINGS ${KNOWN_PROXY_LIB_POOLS})
8484

85+
set(UMF_INSTALL_RPATH "" CACHE STRING "Set the runtime search path to the directory containing hwloc library")
86+
8587
if(UMF_BUILD_TESTS
8688
AND DEFINED ENV{CI}
8789
AND NOT UMF_TESTS_FAIL_ON_SKIP)

src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ elseif(MACOSX)
115115
endif()
116116

117117
if(UMF_BUILD_SHARED_LIBRARY)
118+
if(NOT "${UMF_INSTALL_RPATH}" STREQUAL "")
119+
set(CMAKE_INSTALL_RPATH ${UMF_INSTALL_RPATH})
120+
endif()
121+
118122
if(NOT UMF_DISABLE_HWLOC)
119123
set(HWLOC_LIB ${UMF_HWLOC_NAME})
120124
endif()

0 commit comments

Comments
 (0)