5e4ac01cb1
Append the rpath $ORIGIN/.. to component specific libraries Binaries installed in /opt/rocm-ver/lib/rocprofiler had been appended with $ORIGIN/.. Binaries installed in /opt/rocm-ver/libexec/rocprofiler had been appended with $ORIGIN/../../lib Used TARGET form for installation of rocprof-ctrl and librocprof-tool in runtime component Change-Id: I53b7a283c6a8ddea97d4889db6010832389894bb
29 строки
1.2 KiB
CMake
29 строки
1.2 KiB
CMake
file(GLOB ROCPROFILER_UTIL_SRC_FILES ${PROJECT_SOURCE_DIR}/src/utils/helper.cpp)
|
|
|
|
add_library(perfetto_plugin ${LIBRARY_TYPE} ${ROCPROFILER_UTIL_SRC_FILES} perfetto.cpp
|
|
perfetto_sdk/sdk/perfetto.cc)
|
|
|
|
set_target_properties(
|
|
perfetto_plugin
|
|
PROPERTIES CXX_VISIBILITY_PRESET hidden
|
|
LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../exportmap
|
|
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib/rocprofiler
|
|
INSTALL_RPATH "${ROCM_APPEND_PRIVLIB_RPATH}")
|
|
|
|
target_compile_definitions(perfetto_plugin PRIVATE HIP_PROF_HIP_API_STRING=1
|
|
__HIP_PLATFORM_HCC__=1)
|
|
|
|
target_include_directories(
|
|
perfetto_plugin PRIVATE ${PROJECT_SOURCE_DIR}
|
|
${PROJECT_SOURCE_DIR}/plugin/perfetto/perfetto_sdk/sdk)
|
|
|
|
target_link_options(
|
|
perfetto_plugin PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../exportmap
|
|
-Wl,--no-undefined)
|
|
|
|
target_link_libraries(perfetto_plugin PRIVATE rocprofiler-v2 Threads::Threads stdc++fs
|
|
amd_comgr)
|
|
|
|
install(TARGETS perfetto_plugin
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT plugins)
|