Dosyalar
Kian Cossettini 9f014db6a4 [rocprofiler-systems] Update install path for examples (#2625)
* Update install path for examples to `share/rocprofiler-systems/examples`

----

Co-authored-by: Kian Cossettini <Kian.Cossettini@amd.com>
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
2026-01-15 21:51:16 -05:00

37 satır
1.0 KiB
CMake

# Copyright (c) Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.21 FATAL_ERROR)
project(rocprofiler-systems-user-api-example LANGUAGES CXX)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(
${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES
OR ${_DIR} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES
)
return()
endif()
endif()
set(CMAKE_BUILD_TYPE "Debug")
find_package(Threads REQUIRED)
if(NOT TARGET rocprofiler-systems::rocprofiler-systems-user-library)
find_package(rocprofiler-systems REQUIRED COMPONENTS user)
endif()
add_executable(user-api user-api.cpp)
target_link_libraries(
user-api
PRIVATE Threads::Threads rocprofiler-systems::rocprofiler-systems-user-library
)
if(ROCPROFSYS_INSTALL_EXAMPLES AND TARGET user-api)
install(
TARGETS user-api
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/rocprofiler-systems/examples
COMPONENT rocprofiler-systems-examples
)
endif()