diff options
author | Jim Flynn <jim.flynn@arm.com> | 2020-07-20 16:57:44 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2020-07-29 15:35:15 +0100 |
commit | bbfe603e5ae42317a2b67d713d00882bea341c88 (patch) | |
tree | 8d8a78d6836384fb92fb9741c865443624dfec68 /profiling/server/src/basePipeServer/CMakeLists.txt | |
parent | a9c2ce123a6a5a68728d040a0323c482bbe46903 (diff) | |
download | armnn-bbfe603e5ae42317a2b67d713d00882bea341c88.tar.gz |
IVGCVSW-5166 Pull out the common and server side code into standalone libraries
Change-Id: I180f84c493a9b2be4b93b25d312ebdd9e71b1735
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'profiling/server/src/basePipeServer/CMakeLists.txt')
-rw-r--r-- | profiling/server/src/basePipeServer/CMakeLists.txt | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/profiling/server/src/basePipeServer/CMakeLists.txt b/profiling/server/src/basePipeServer/CMakeLists.txt index 56ef4548ec..b5dc68c2c4 100644 --- a/profiling/server/src/basePipeServer/CMakeLists.txt +++ b/profiling/server/src/basePipeServer/CMakeLists.txt @@ -1,37 +1,49 @@ # -# Copyright © 2020 Arm Ltd. All rights reserved. +# Copyright © 2020 Arm Ltd and Contributors. All rights reserved. # SPDX-License-Identifier: MIT # if(BUILD_BASE_PIPE_SERVER) set(BasePipeServer_sources) list(APPEND BasePipeServer_sources - BasePipeServer.cpp - BasePipeServer.hpp - ConnectionHandler.cpp - ConnectionHandler.hpp) + BasePipeServer.cpp) + + if(NOT "${TOOLCHAIN_PREFIX}" STREQUAL x86_64-w64-mingw32) + list(APPEND BasePipeServer_sources + ConnectionHandler.cpp) + endif() include_directories(${PROJECT_SOURCE_DIR}/profiling/common/include) + include_directories(${PROJECT_SOURCE_DIR}/profiling/server/include/basePipeServer) if (BUILD_UNIT_TESTS) target_include_directories(UnitTests PRIVATE ${PROJECT_SOURCE_DIR}/profiling/server/src/basePipeServer) target_include_directories(UnitTests PUBLIC ${PROJECT_SOURCE_DIR}/profiling/common/include) endif() - add_library_ex(armnnBasePipeServer SHARED ${BasePipeServer_sources}) + if (BUILD_STATIC_PIPE_LIBS) + add_library_ex(armnnBasePipeServer STATIC ${BasePipeServer_sources}) + target_link_libraries(armnnBasePipeServer pipeCommon) - set_target_properties(armnnBasePipeServer PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) - set_target_properties(armnnBasePipeServer PROPERTIES VERSION ${GENERIC_LIB_VERSION} - SOVERSION ${GENERIC_LIB_SOVERSION}) + if ("${CMAKE_SYSTEM_NAME}" STREQUAL Windows) + target_link_libraries(armnnBasePipeServer ws2_32.lib) + endif() + else() + add_library_ex(armnnBasePipeServer SHARED ${BasePipeServer_sources}) + target_link_libraries(armnnBasePipeServer pipeCommon) - target_include_directories(armnnBasePipeServer PRIVATE ${PROJECT_SOURCE_DIR}/src/armnnUtils) + if ("${CMAKE_SYSTEM_NAME}" STREQUAL Windows) + target_link_libraries(armnnBasePipeServer ws2_32.lib) + endif() - target_link_libraries(armnnBasePipeServer armnn) - if ("${CMAKE_SYSTEM_NAME}" STREQUAL Windows) - target_link_libraries(armnnBasePipeServer Ws2_32.lib) - endif() + set_target_properties(armnnBasePipeServer PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) + set_target_properties(armnnBasePipeServer PROPERTIES VERSION ${GENERIC_LIB_VERSION} + SOVERSION ${GENERIC_LIB_SOVERSION}) + + target_include_directories(armnnBasePipeServer PRIVATE ${PROJECT_SOURCE_DIR}/src/armnnUtils) - install(TARGETS armnnBasePipeServer - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif()
\ No newline at end of file + install(TARGETS armnnBasePipeServer + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() +endif() |