Skip to content

Commit af3d463

Browse files
committed
[CMake] Set runpath of libsycl.so
libsycl.so depends on libur_loader.so, however it doesn't have an runpath set to find it. This fixes that.
1 parent 92479ee commit af3d463

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
@@ -218,7 +218,9 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME)
218218

219219
set_target_properties(${LIB_NAME} PROPERTIES
220220
VERSION ${SYCL_VERSION_STRING}
221-
SOVERSION ${SYCL_MAJOR_VERSION})
221+
SOVERSION ${SYCL_MAJOR_VERSION}
222+
# Set the runpath to the lib directory so libsycl can find libur_loader
223+
INSTALL_RPATH "\$ORIGIN")
222224

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

0 commit comments

Comments
 (0)