blob: 4ac68a52af1ec8123bffb28fcb4cfeb948c15d36 [file] [log] [blame]
Jim Flynnbbfe6032020-07-20 16:57:44 +01001#
2# Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3# SPDX-License-Identifier: MIT
4#
5
6if(BUILD_TIMELINE_DECODER)
7 set(timelineDecoder_sources)
8 list(APPEND timelineDecoder_sources
Jim Flynnc454ac92022-03-16 18:43:18 +00009 DirectoryCaptureCommandHandler.cpp
Jim Flynnbbfe6032020-07-20 16:57:44 +010010 TimelineCaptureCommandHandler.cpp
11 TimelineDecoder.cpp
12 TimelineDirectoryCaptureCommandHandler.cpp)
13
14 include_directories(${PROJECT_SOURCE_DIR}/profiling/common/include)
15
16 if(BUILD_UNIT_TESTS)
17 include_directories(${PROJECT_SOURCE_DIR}/src/profiling
18 ${PROJECT_SOURCE_DIR}/src/armnnUtils)
19 target_include_directories(UnitTests PRIVATE ${PROJECT_SOURCE_DIR}/profiling/server/include/timelineDecoder)
20 endif()
21
22
23 if (BUILD_STATIC_PIPE_LIBS)
24 add_library_ex(timelineDecoder STATIC ${timelineDecoder_sources})
25 target_link_libraries(timelineDecoder pipeCommon)
26
27 if ("${CMAKE_SYSTEM_NAME}" STREQUAL Windows)
28 target_link_libraries(timelineDecoder ws2_32.lib)
29 endif()
30 else()
31 add_library_ex(timelineDecoder SHARED ${timelineDecoder_sources})
32 target_link_libraries(timelineDecoder pipeCommon)
33
34 if ("${CMAKE_SYSTEM_NAME}" STREQUAL Windows)
35 target_link_libraries(timelineDecoder ws2_32.lib)
36 endif()
37
38 set_target_properties(timelineDecoder PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
39 set_target_properties(timelineDecoder PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
40
41 install(TARGETS timelineDecoder
42 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
43 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44 endif()
45endif()