FreeRTOS-LTS/CMakeLists.txt

47 lines
991 B
CMake
Raw Normal View History

2023-01-12 17:06:31 +01:00
cmake_minimum_required(VERSION 3.13)
set(LIB_FREERTOS_NAME FreeRTOS)
project(${LIB_FREERTOS_NAME}
2023-01-12 17:09:22 +01:00
VERSION 202210.01)
2023-01-12 17:06:31 +01:00
add_library(${LIB_FREERTOS_NAME})
target_sources(
${LIB_FREERTOS_NAME}
PRIVATE
FreeRTOS/FreeRTOS-Kernel/list.c
FreeRTOS/FreeRTOS-Kernel/queue.c
FreeRTOS/FreeRTOS-Kernel/tasks.c
FreeRTOS/FreeRTOS-Kernel/timers.c
)
2023-01-13 09:54:42 +01:00
target_include_directories(
${LIB_FREERTOS_NAME}
PUBLIC
FreeRTOS/FreeRTOS-Kernel/include
)
if(NOT FreeRTOS_PORT)
message(
STATUS
"FreeRTOS_PORT is empty. either set it or add port files manually."
)
else()
if(FreeRTOS_PORT MATCHES "posix")
target_sources(
${LIB_FREERTOS_NAME}
PRIVATE
FreeRTOS/FreeRTOS-Kernel/portable/ThirdParty/GCC/Posix/port.c
)
target_include_directories(
${LIB_FREERTOS_NAME}
2023-01-13 10:08:11 +01:00
PUBLIC
2023-01-13 09:54:42 +01:00
FreeRTOS/FreeRTOS-Kernel/portable/ThirdParty/GCC/Posix/
)
else()
message(
ERROR
"Unsupportet FreeRTOS_PORT."
)
endif()
endif()