some cmake fixes for FreeRTOS
This commit is contained in:
parent
b00bfe4bda
commit
c9156e1219
@ -43,12 +43,12 @@ endif()
|
||||
|
||||
set(FSFW_OSAL_DEFINITION FSFW_HOST)
|
||||
|
||||
if(${OS_FSFW} STREQUAL host)
|
||||
if(OS_FSFW MATCHES host)
|
||||
set(OS_FSFW_NAME "Host")
|
||||
elseif(${OS_FSFW} STREQUAL linux)
|
||||
elseif(OS_FSFW MATCHES linux)
|
||||
set(OS_FSFW_NAME "Linux")
|
||||
set(FSFW_OSAL_DEFINITION FSFW_LINUX)
|
||||
elseif(${OS_FSFW} STREQUAL freertos)
|
||||
elseif(OS_FSFW MATCHES freertos)
|
||||
set(OS_FSFW_NAME "FreeRTOS")
|
||||
set(FSFW_OSAL_DEFINITION FSFW_FREERTOS)
|
||||
target_link_libraries(${LIB_FSFW_NAME} PRIVATE
|
||||
|
@ -22,10 +22,11 @@ target_sources(${LIB_FSFW_NAME}
|
||||
# FreeRTOS as a static library and set LIB_OS_NAME to the target name of the
|
||||
# library.
|
||||
if(NOT LIB_OS_NAME)
|
||||
message(FATAL_ERROR
|
||||
"FreeRTOS needs to be linked as a target and "
|
||||
"LIB_OS_NAME needs to be set to the target"
|
||||
message(STATUS
|
||||
"LIB_OS_NAME is empty. Make sure to include the FreeRTOS header path properly."
|
||||
)
|
||||
else()
|
||||
target_link_libraries(${LIB_FSFW_NAME} PRIVATE
|
||||
${LIB_OS_NAME}
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${LIB_FSWFW_NAME} ${LIB_OS_NAME})
|
Loading…
Reference in New Issue
Block a user