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)
|
set(FSFW_OSAL_DEFINITION FSFW_HOST)
|
||||||
|
|
||||||
if(${OS_FSFW} STREQUAL host)
|
if(OS_FSFW MATCHES host)
|
||||||
set(OS_FSFW_NAME "Host")
|
set(OS_FSFW_NAME "Host")
|
||||||
elseif(${OS_FSFW} STREQUAL linux)
|
elseif(OS_FSFW MATCHES linux)
|
||||||
set(OS_FSFW_NAME "Linux")
|
set(OS_FSFW_NAME "Linux")
|
||||||
set(FSFW_OSAL_DEFINITION FSFW_LINUX)
|
set(FSFW_OSAL_DEFINITION FSFW_LINUX)
|
||||||
elseif(${OS_FSFW} STREQUAL freertos)
|
elseif(OS_FSFW MATCHES freertos)
|
||||||
set(OS_FSFW_NAME "FreeRTOS")
|
set(OS_FSFW_NAME "FreeRTOS")
|
||||||
set(FSFW_OSAL_DEFINITION FSFW_FREERTOS)
|
set(FSFW_OSAL_DEFINITION FSFW_FREERTOS)
|
||||||
target_link_libraries(${LIB_FSFW_NAME} PRIVATE
|
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
|
# FreeRTOS as a static library and set LIB_OS_NAME to the target name of the
|
||||||
# library.
|
# library.
|
||||||
if(NOT LIB_OS_NAME)
|
if(NOT LIB_OS_NAME)
|
||||||
message(FATAL_ERROR
|
message(STATUS
|
||||||
"FreeRTOS needs to be linked as a target and "
|
"LIB_OS_NAME is empty. Make sure to include the FreeRTOS header path properly."
|
||||||
"LIB_OS_NAME needs to be set to the target"
|
)
|
||||||
|
else()
|
||||||
|
target_link_libraries(${LIB_FSFW_NAME} PRIVATE
|
||||||
|
${LIB_OS_NAME}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${LIB_FSWFW_NAME} ${LIB_OS_NAME})
|
|
Loading…
Reference in New Issue
Block a user