blob: 7154722fa632cad4be0ec6bd0a197816a4dc8f71 [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
9 TimelineCaptureCommandHandler.cpp
10 TimelineDecoder.cpp
11 TimelineDirectoryCaptureCommandHandler.cpp)
12
13 include_directories(${PROJECT_SOURCE_DIR}/profiling/common/include)
14
15 if(BUILD_UNIT_TESTS)
16 include_directories(${PROJECT_SOURCE_DIR}/src/profiling
17 ${PROJECT_SOURCE_DIR}/src/armnnUtils)
18 target_include_directories(UnitTests PRIVATE ${PROJECT_SOURCE_DIR}/profiling/server/include/timelineDecoder)
19 endif()
20
21
22 if (BUILD_STATIC_PIPE_LIBS)
23 add_library_ex(timelineDecoder STATIC ${timelineDecoder_sources})
24 target_link_libraries(timelineDecoder pipeCommon)
25
26 if ("${CMAKE_SYSTEM_NAME}" STREQUAL Windows)
27 target_link_libraries(timelineDecoder ws2_32.lib)
28 endif()
29 else()
30 add_library_ex(timelineDecoder SHARED ${timelineDecoder_sources})
31 target_link_libraries(timelineDecoder pipeCommon)
32
33 if ("${CMAKE_SYSTEM_NAME}" STREQUAL Windows)
34 target_link_libraries(timelineDecoder ws2_32.lib)
35 endif()
36
37 set_target_properties(timelineDecoder PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
38 set_target_properties(timelineDecoder PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
39
40 install(TARGETS timelineDecoder
41 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
42 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
43 endif()
44endif()