diff options
Diffstat (limited to 'src/components/transport_manager/CMakeLists.txt')
-rw-r--r-- | src/components/transport_manager/CMakeLists.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/components/transport_manager/CMakeLists.txt b/src/components/transport_manager/CMakeLists.txt index 4fa224393d..2f734b3a05 100644 --- a/src/components/transport_manager/CMakeLists.txt +++ b/src/components/transport_manager/CMakeLists.txt @@ -43,6 +43,12 @@ include_directories ( ${LOG4CXX_INCLUDE_DIRECTORY} ) +if (CMAKE_SYSTEM_NAME STREQUAL "QNX") + include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/include/transport_manager/tcp/platform_specific/qnx") +elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") + include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/include/transport_manager/tcp/platform_specific/linux") +endif () + set(PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/src @@ -96,8 +102,23 @@ if(NOT BUILD_TESTS) ) endif() +# exclude platform-dependent files before running collect_sources +list(APPEND EXCLUDE_PATHS + ${COMPONENTS_DIR}/transport_manager/include/transport_manager/tcp/platform_specific + ${COMPONENTS_DIR}/transport_manager/src/tcp/platform_specific +) + collect_sources(SOURCES "${PATHS}" "${EXCLUDE_PATHS}") +# then add platform-dependent files later +set(PLATFORM_DEPENDENT_SOURCES) +if (CMAKE_SYSTEM_NAME STREQUAL "QNX") + collect_sources(PLATFORM_DEPENDENT_SOURCES "${COMPONENTS_DIR}/transport_manager/src/tcp/platform_specific/qnx") +elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") + collect_sources(PLATFORM_DEPENDENT_SOURCES "${COMPONENTS_DIR}/transport_manager/src/tcp/platform_specific/linux") +endif () +list(APPEND SOURCES ${PLATFORM_DEPENDENT_SOURCES}) + add_library("TransportManager" ${SOURCES}) target_link_libraries("TransportManager" ${LIBRARIES}) |