fsfw/src/fsfw/osal/CMakeLists.txt

40 lines
1.1 KiB
CMake
Raw Normal View History

2020-12-07 01:40:10 +01:00
# Check the OS_FSFW variable
2021-07-13 18:52:19 +02:00
if(FSFW_OSAL MATCHES "freertos")
2022-05-16 14:55:15 +02:00
add_subdirectory(freertos)
2023-01-12 15:40:52 +01:00
set(FSFW_OSAL_FREERTOS 1)
2021-07-13 18:52:19 +02:00
elseif(FSFW_OSAL MATCHES "rtems")
2022-05-16 14:55:15 +02:00
add_subdirectory(rtems)
2023-01-12 15:40:52 +01:00
set(FSFW_OSAL_RTEMS 1)
2021-07-13 18:52:19 +02:00
elseif(FSFW_OSAL MATCHES "linux")
2022-05-16 14:55:15 +02:00
add_subdirectory(linux)
2023-01-12 15:40:52 +01:00
set(FSFW_OSAL_LINUX 1)
2021-07-13 18:52:19 +02:00
elseif(FSFW_OSAL MATCHES "host")
2022-05-16 14:55:15 +02:00
add_subdirectory(host)
if(WIN32)
add_subdirectory(windows)
elseif(UNIX)
# We still need to pull in some Linux specific sources
target_sources(${LIB_FSFW_NAME} PUBLIC linux/tcpipHelpers.cpp)
endif()
2023-01-12 15:40:52 +01:00
set(FSFW_OSAL_HOST 1)
2020-12-07 01:40:10 +01:00
else()
2022-05-16 14:55:15 +02:00
message(WARNING "The OS_FSFW variable was not set. Assuming host OS..")
# Not set. Assumuing this is a host build, try to determine host OS
if(WIN32)
add_subdirectory(host)
add_subdirectory(windows)
2023-01-12 15:40:52 +01:00
set(FSFW_OSAL_HOST 1)
2022-05-16 14:55:15 +02:00
elseif(UNIX)
add_subdirectory(linux)
2023-01-12 15:40:52 +01:00
set(FSFW_OSAL_LINUX 1)
2022-05-16 14:55:15 +02:00
else()
# MacOS or other OSes have not been tested yet / are not supported.
message(FATAL_ERROR "The host OS could not be determined! Aborting.")
endif()
2020-12-07 01:40:10 +01:00
endif()
2022-05-16 14:55:15 +02:00
add_subdirectory(common)
2023-01-12 15:40:52 +01:00
configure_file(osal.h.in ${CMAKE_BINARY_DIR}/fsfw/osal/osal.h)