Skip to content

Commit bb2331f

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

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ 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
86+
""
87+
CACHE
88+
STRING
89+
"Set the runtime search path to the directory containing hwloc library")
90+
8591
if(UMF_BUILD_TESTS
8692
AND DEFINED ENV{CI}
8793
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)