Skip to content

Commit e44f5fb

Browse files
authored
[CMake] Set runpath of libsycl.so (#15850)
libsycl.so depends on libur_loader.so, however it doesn't have an rpath set to find it. This fixes that.
1 parent 546c56c commit e44f5fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sycl/source/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME)
220220

221221
set_target_properties(${LIB_NAME} PROPERTIES
222222
VERSION ${SYCL_VERSION_STRING}
223-
SOVERSION ${SYCL_MAJOR_VERSION})
223+
SOVERSION ${SYCL_MAJOR_VERSION}
224+
# Set the runpath to the lib directory so libsycl can find libur_loader
225+
INSTALL_RPATH "\$ORIGIN")
224226

225227
# When building using icx on Windows, the VERSION file
226228
# produced by cmake is used in source code

0 commit comments

Comments
 (0)