d07bf508a9
The Omnitrace program is being renamed. Full name: "ROCm Systems Profiler" Package name: "rocprofiler-systems" Binary / Library names: "rocprof-sys-*" --------- Co-authored-by: Xuan Chen <xuchen@amd.com> Signed-off-by: David Galiffi <David.Galiffi@amd.com>
74 lines
3.0 KiB
CMake
74 lines
3.0 KiB
CMake
# ------------------------------------------------------------------------------#
|
|
#
|
|
# rocprofiler-systems object library
|
|
#
|
|
# ------------------------------------------------------------------------------#
|
|
|
|
add_library(rocprofiler-systems-object-library OBJECT)
|
|
add_library(rocprofiler-systems::rocprofiler-systems-object-library ALIAS
|
|
rocprofiler-systems-object-library)
|
|
|
|
target_sources(
|
|
rocprofiler-systems-object-library
|
|
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/library.cpp ${CMAKE_CURRENT_LIST_DIR}/regions.cpp
|
|
${CMAKE_CURRENT_LIST_DIR}/progress.cpp ${CMAKE_CURRENT_LIST_DIR}/api.cpp
|
|
${CMAKE_CURRENT_LIST_DIR}/timeout.cpp ${CMAKE_CURRENT_LIST_DIR}/api.hpp)
|
|
|
|
add_subdirectory(library)
|
|
|
|
target_link_libraries(rocprofiler-systems-object-library
|
|
PRIVATE rocprofiler-systems::rocprofiler-systems-interface-library)
|
|
|
|
# ------------------------------------------------------------------------------#
|
|
#
|
|
# rocprofiler-systems static library
|
|
#
|
|
# ------------------------------------------------------------------------------#
|
|
|
|
add_library(rocprofiler-systems-static-library STATIC
|
|
$<TARGET_OBJECTS:rocprofiler-systems-object-library>)
|
|
add_library(rocprofiler-systems::librocprofiler-systems-static ALIAS
|
|
rocprofiler-systems-static-library)
|
|
|
|
target_link_libraries(
|
|
rocprofiler-systems-static-library
|
|
PRIVATE rocprofiler-systems::rocprofiler-systems-interface-library
|
|
rocprofiler-systems::rocprofiler-systems-core
|
|
rocprofiler-systems::rocprofiler-systems-binary)
|
|
|
|
set_target_properties(rocprofiler-systems-static-library PROPERTIES OUTPUT_NAME
|
|
${BINARY_NAME_PREFIX})
|
|
|
|
# ------------------------------------------------------------------------------#
|
|
#
|
|
# rocprofiler-systems shared library
|
|
#
|
|
# ------------------------------------------------------------------------------#
|
|
|
|
add_library(rocprofiler-systems-shared-library SHARED
|
|
$<TARGET_OBJECTS:rocprofiler-systems-object-library>)
|
|
add_library(rocprofiler-systems::librocprofiler-systems-shared ALIAS
|
|
rocprofiler-systems-shared-library)
|
|
add_library(rocprofiler-systems::rocprofiler-systems-library ALIAS
|
|
rocprofiler-systems-shared-library)
|
|
|
|
target_link_libraries(
|
|
rocprofiler-systems-shared-library
|
|
PRIVATE rocprofiler-systems::rocprofiler-systems-interface-library
|
|
rocprofiler-systems::rocprofiler-systems-core
|
|
rocprofiler-systems::rocprofiler-systems-binary)
|
|
|
|
set_target_properties(
|
|
rocprofiler-systems-shared-library
|
|
PROPERTIES OUTPUT_NAME ${BINARY_NAME_PREFIX}
|
|
VERSION ${PROJECT_VERSION}
|
|
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
|
INSTALL_RPATH "${ROCPROFSYS_LIB_INSTALL_RPATH}")
|
|
|
|
rocprofiler_systems_strip_target(rocprofiler-systems-shared-library)
|
|
|
|
install(
|
|
TARGETS rocprofiler-systems-shared-library
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
OPTIONAL)
|