From b0035605eea12ccb514bfd6d78929794dd7aced4 Mon Sep 17 00:00:00 2001 From: "Galantsev, Dmitrii" Date: Thu, 10 Oct 2024 03:15:04 -0500 Subject: [PATCH] CMAKE - Find modules at build time Change-Id: I9370ef1433579aff1a37f3636050f525638d8658 Signed-off-by: Galantsev, Dmitrii [ROCm/rdc commit: cdf1588974f8ecd1213b1ccc7ff271b3cfdf7c44] --- projects/rdc/rdc_libs/rdc_modules/rdc_rocp/CMakeLists.txt | 5 +++++ projects/rdc/rdc_libs/rdc_modules/rdc_rocr/CMakeLists.txt | 5 +++++ projects/rdc/rdc_libs/rdc_modules/rdc_rvs/CMakeLists.txt | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/projects/rdc/rdc_libs/rdc_modules/rdc_rocp/CMakeLists.txt b/projects/rdc/rdc_libs/rdc_modules/rdc_rocp/CMakeLists.txt index 507b0b19cc..7db6d822d3 100644 --- a/projects/rdc/rdc_libs/rdc_modules/rdc_rocp/CMakeLists.txt +++ b/projects/rdc/rdc_libs/rdc_modules/rdc_rocp/CMakeLists.txt @@ -41,6 +41,11 @@ if(BUILD_PROFILER) "${ROCM_DIR}/include" "${ROCM_DIR}/include/hsa") + # let bootstrap find this module at build time + # at install-time the directory structure is a lot simpler + set_property(TARGET ${BOOTSTRAP_LIB} APPEND PROPERTY + BUILD_RPATH "\$ORIGIN/../rdc_modules/${RDC_ROCP_LIB}") + # Set the VERSION and SOVERSION values set_property(TARGET ${RDC_ROCP_LIB} PROPERTY SOVERSION "${VERSION_MAJOR}") diff --git a/projects/rdc/rdc_libs/rdc_modules/rdc_rocr/CMakeLists.txt b/projects/rdc/rdc_libs/rdc_modules/rdc_rocr/CMakeLists.txt index 85326c4bfa..d441539a34 100644 --- a/projects/rdc/rdc_libs/rdc_modules/rdc_rocr/CMakeLists.txt +++ b/projects/rdc/rdc_libs/rdc_modules/rdc_rocr/CMakeLists.txt @@ -48,6 +48,11 @@ if(BUILD_RUNTIME) "${SMI_INC_DIR}" "${ROCM_DIR}/include") + # let bootstrap find this module at build time + # at install-time the directory structure is a lot simpler + set_property(TARGET ${BOOTSTRAP_LIB} APPEND PROPERTY + BUILD_RPATH "\$ORIGIN/../rdc_modules/${RDC_ROCR_LIB}") + # Set the VERSION and SOVERSION values set_property(TARGET ${RDC_ROCR_LIB} PROPERTY SOVERSION "${VERSION_MAJOR}") diff --git a/projects/rdc/rdc_libs/rdc_modules/rdc_rvs/CMakeLists.txt b/projects/rdc/rdc_libs/rdc_modules/rdc_rvs/CMakeLists.txt index 3358749175..5d6e177e4c 100644 --- a/projects/rdc/rdc_libs/rdc_modules/rdc_rvs/CMakeLists.txt +++ b/projects/rdc/rdc_libs/rdc_modules/rdc_rvs/CMakeLists.txt @@ -44,6 +44,11 @@ if(BUILD_RVS) "${ROCM_DIR}/include/hsa" "${ROCM_VALIDATION_SUITE_INCLUDE_DIR}") + # let bootstrap find this module at build time + # at install-time the directory structure is a lot simpler + set_property(TARGET ${BOOTSTRAP_LIB} APPEND PROPERTY + BUILD_RPATH "\$ORIGIN/../rdc_modules/${RDC_RVS_LIB}") + # Set the VERSION and SOVERSION values set_property(TARGET ${RDC_RVS_LIB} PROPERTY SOVERSION "${VERSION_MAJOR}")