Skip to content

Commit

Permalink
Fix RPATH to use $PACKAGE_NAME
Browse files Browse the repository at this point in the history
  • Loading branch information
dgaliffiAMD committed Sep 27, 2024
1 parent 4dc811e commit 10ad119
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmake/ConfigInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ export(

set(rocprofsys_DIR
"${_BUILDTREE_EXPORT_DIR}"
CACHE PATH "rocprofsys" FORCE)
CACHE PATH "${PACKAGE_NAME}" FORCE)
9 changes: 5 additions & 4 deletions cmake/Packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,14 @@ if(OMNITRACE_BUILD_DYNINST)
CMAKE_BUILD_RPATH CMAKE_INSTALL_RPATH_USE_LINK_PATH)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF)
set(CMAKE_BUILD_RPATH "\$ORIGIN:\$ORIGIN/rocprofsys")
set(CMAKE_INSTALL_RPATH "\$ORIGIN:\$ORIGIN/rocprofsys")

set(CMAKE_BUILD_RPATH "\$ORIGIN:\$ORIGIN/${PACKAGE_NAME}")
set(CMAKE_INSTALL_RPATH "\$ORIGIN:\$ORIGIN/${PACKAGE_NAME}")
set(DYNINST_TPL_INSTALL_PREFIX
"rocprofsys"
"${PACKAGE_NAME}"
CACHE PATH "Third-party library install-tree install prefix" FORCE)
set(DYNINST_TPL_INSTALL_LIB_DIR
"rocprofsys"
"${PACKAGE_NAME}"
CACHE PATH "Third-party library install-tree install library prefix" FORCE)
add_subdirectory(external/dyninst EXCLUDE_FROM_ALL)
omnitrace_restore_variables(
Expand Down
4 changes: 2 additions & 2 deletions source/bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ if(OMNITRACE_USE_ROCPROFILER
AND ROCmVersion_TRIPLE_VERSION VERSION_LESS 5.2.0
AND NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)
set(OMNITRACE_EXE_INSTALL_RPATH
"\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}/rocprofsys:${rocprofiler_LIBRARY_DIR}"
"\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}/${PACKAGE_NAME}:${rocprofiler_LIBRARY_DIR}"
)
else()
set(OMNITRACE_EXE_INSTALL_RPATH
"\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}/rocprofsys"
"\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}/${PACKAGE_NAME}"
)
endif()

Expand Down
4 changes: 2 additions & 2 deletions source/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ if(OMNITRACE_USE_ROCPROFILER
AND ROCmVersion_TRIPLE_VERSION VERSION_LESS 5.2.0
AND NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)
set(OMNITRACE_LIB_INSTALL_RPATH
"\$ORIGIN:\$ORIGIN/rocprofsys:${rocprofiler_LIBRARY_DIR}")
"\$ORIGIN:\$ORIGIN/${PACKAGE_NAME}:${rocprofiler_LIBRARY_DIR}")
else()
set(OMNITRACE_LIB_INSTALL_RPATH "\$ORIGIN:\$ORIGIN/rocprofsys")
set(OMNITRACE_LIB_INSTALL_RPATH "\$ORIGIN:\$ORIGIN/${PACKAGE_NAME}")
endif()

# ------------------------------------------------------------------------------#
Expand Down

0 comments on commit 10ad119

Please sign in to comment.