33 lines
683 B
CMake
33 lines
683 B
CMake
cmake_minimum_required(VERSION 3.13)
|
|
|
|
set(LIB_FSFW_HAL_NAME fsfw_hal)
|
|
set(LINUX_HAL_PATH_NAME linux)
|
|
set(STM32H7_PATH_NAME stm32h7)
|
|
|
|
add_library(${LIB_FSFW_HAL_NAME})
|
|
|
|
if(NOT LIB_FSFW_NAME)
|
|
message(ERROR "LIB_FSFW_NAME needs to be set as a linkable target")
|
|
endif()
|
|
|
|
set_property(CACHE TGT_BSP PROPERTY STRINGS
|
|
arm/stm32h743zi-nucleo
|
|
arm/raspberrypi
|
|
)
|
|
|
|
target_sources(${LIB_FSFW_HAL_NAME} PRIVATE
|
|
Dummy.cpp
|
|
)
|
|
|
|
if(TGT_BSP MATCHES "arm/raspberrypi")
|
|
add_subdirectory(${LINUX_HAL_PATH_NAME})
|
|
endif()
|
|
|
|
if(TGT_BSP MATCHES "arm/stm32h743zi-nucleo")
|
|
add_subdirectory(${STM32H7_PATH_NAME})
|
|
endif()
|
|
|
|
target_link_libraries(${LIB_FSFW_HAL_NAME}
|
|
${LIB_FSFW_NAME}
|
|
)
|