File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,14 @@ function(build_dpctl_ext _trgt _src _dest)
146
146
get_filename_component (_generated_src_dir_dir ${_generated_src_dir} DIRECTORY )
147
147
# TODO: do not set directory if we did not generate header
148
148
target_include_directories (${_trgt} INTERFACE ${_generated_src_dir_dir} )
149
+ set (_rpath_value "$ORIGIN" )
150
+ if (DPCTL_WITH_REDIST )
151
+ get_filename_component (_src_dir ${_src} DIRECTORY )
152
+ cmake_path (RELATIVE_PATH CMAKE_SOURCE_DIR BASE_DIRECTORY ${_src_dir} OUTPUT_VARIABLE _relative_path )
153
+ string (JOIN ":" _expanded_rpath_value ${_rpath_value} "$ORIGIN/${_relative_path} /../../" )
154
+ set (_rpath_value ${_expanded_rpath_value} )
155
+ endif ()
156
+ set_target_properties (${_trgt} PROPERTIES INSTALL_RPATH ${_rpath_value} )
149
157
150
158
install (TARGETS ${_trgt}
151
159
LIBRARY DESTINATION ${_dest} )
You can’t perform that action at this time.
0 commit comments