From 61905bdb9fb12d82bf70fe1cb8a565385f4f7f62 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 26 Jan 2022 23:08:28 +0000 Subject: [PATCH] SWDEV-320586 - rpath to use cmake_prefix_path for install/lib/libamdhip64 Change-Id: I70c4f66d27c29e874275be6e594dc7d22491054d [ROCm/clr commit: c792ff7bfc50d98b5d827b4658685e211c685d67] --- projects/clr/hipamd/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/clr/hipamd/CMakeLists.txt b/projects/clr/hipamd/CMakeLists.txt index 2e917e640c..e66666519f 100755 --- a/projects/clr/hipamd/CMakeLists.txt +++ b/projects/clr/hipamd/CMakeLists.txt @@ -36,6 +36,12 @@ project(hip) # By default, CMake will search for a folder named vdi or ROCclr relative to the current path. Specify -DROCCLR_PATH=$ROCCLR_DIR if rocclr source is in obscure location. # By default, CMake will search for a folder named opencl or ROCm-OpenCL-Runtime relative to the current path. Specify -DAMD_OPENCL_PATH=$OPENCL_DIR if opencl source is in obscure location. list(APPEND CMAKE_MODULE_PATH ${HIP_COMMON_DIR}/cmake) + +# required to add the right link to libhsa-runtime in install/lib path +# CMAKE_PREFIX_PATH is used as rpath to search for libs outside HIP +set(CMAKE_INSTALL_RPATH "${CMAKE_PREFIX_PATH}/lib") +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + ############################# # Options #############################