Files
rocm-systems/projects/rocprofiler/plugin/perfetto/CMakeLists.txt
T
Ammar ELWazir cc8bf264c7 SWDEV-415259: Replacing HCC with AMD
Change-Id: I3de30d52d7e25ce5a6c727fba81af9a031f7eee3


[ROCm/rocprofiler commit: a3dfe3d680]
2023-08-18 09:59:27 -04:00

29 lines
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_AMD__=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)