diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4b36e57 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.13) + +set(LIB_FSFW_HAL_NAME fsfw_hal) +set(RPI_PATH_NAME rpi) +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(${RPI_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} +) diff --git a/Dummy.cpp b/Dummy.cpp new file mode 100644 index 0000000..e69de29 diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..2c5cd11 --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.13) + +set(LIB_FSFW_HAL_NAME fsfw_hal) +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() + +target_link_libraries(${LIB_FSFW_NAME}) diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/host/CMakeLists.txt @@ -0,0 +1 @@ + diff --git a/rpi/CMakeLists.txt b/rpi/CMakeLists.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/rpi/CMakeLists.txt @@ -0,0 +1 @@ + diff --git a/stm32h7/CMakeLists.txt b/stm32h7/CMakeLists.txt new file mode 100644 index 0000000..e69de29