1# 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 DirectoryCaptureCommandHandler.cpp 10 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() 46