Skip to content

Commit 870f040

Browse files
authored
Extend INSTALL_RPATH to include parent directories
This change ensures that shared libraries located in $ORIGIN, $ORIGIN/../.., and $ORIGIN/../../.. are discoverable at runtime, improving robustness in environments where dependent libraries may be installed outside the immediate directory
1 parent 77317c0 commit 870f040

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ target_link_options(_ufuncs PRIVATE ${_linker_options})
129129
target_link_libraries(_ufuncs PRIVATE mkl_umath_loops)
130130
set_target_properties(_ufuncs PROPERTIES C_STANDARD 99)
131131
if (UNIX)
132-
set_target_properties(_ufuncs PROPERTIES INSTALL_RPATH "$ORIGIN")
132+
set_target_properties(_ufuncs PROPERTIES INSTALL_RPATH "$ORIGIN/../..;$ORIGIN/../../..;$ORIGIN")
133133
endif()
134134
install(TARGETS _ufuncs LIBRARY DESTINATION mkl_umath)
135135

0 commit comments

Comments
 (0)