SWDEV-444700 - CMAKE - Fix RUNPATH
These RUNPATH changes make it so libraries can be found without setting LD_LIBRARY_PATH. Mostly tested on installed RDC binaries and libraries. The build binaries should also work. Change-Id: Ifd908a5b61d24dfcbb1d08d21b4ee830156d8643 Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
This commit is contained in:
@@ -80,6 +80,10 @@ link_directories(${RSMI_LIB_DIR})
|
||||
|
||||
add_executable(${SERVER_DAEMON_EXE} "${SERVER_SRC_LIST}")
|
||||
|
||||
# help find librdc_bootstrap.so at runtime
|
||||
set_target_properties(${SERVER_DAEMON_EXE}
|
||||
PROPERTIES INSTALL_RPATH "\$ORIGIN/../lib")
|
||||
|
||||
target_link_libraries(${SERVER_DAEMON_EXE} pthread rt gRPC::grpc++
|
||||
cap dl rocm_smi64 rdc_bootstrap)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user