Skip to content

Commit a957dd0

Browse files
Merge pull request #892 from PatKamin/rpath-main
Add a RUNPATH to installed libraries
2 parents dffe4e6 + 60cc555 commit a957dd0

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
@@ -63,6 +63,12 @@ option(UMF_FORMAT_CODE_STYLE
6363
set(UMF_HWLOC_NAME
6464
"hwloc"
6565
CACHE STRING "Custom name for hwloc library w/o extension")
66+
set(UMF_INSTALL_RPATH
67+
""
68+
CACHE
69+
STRING
70+
"Set the runtime search path to the directory with dependencies (e.g. hwloc)"
71+
)
6672

6773
# Only a part of skips is treated as a failure now. TODO: extend to all tests
6874
option(UMF_TESTS_FAIL_ON_SKIP "Treat skips in tests as fail" OFF)

src/CMakeLists.txt

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

118118
if(UMF_BUILD_SHARED_LIBRARY)
119+
if(UMF_INSTALL_RPATH)
120+
set(CMAKE_INSTALL_RPATH "${UMF_INSTALL_RPATH}")
121+
endif()
122+
119123
if(NOT UMF_DISABLE_HWLOC)
120124
set(HWLOC_LIB ${UMF_HWLOC_NAME})
121125
endif()

0 commit comments

Comments
 (0)