-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
47 lines (40 loc) · 1.09 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.27)
project(myapp
LANGUAGES CXX C ASM
)
if (${SIM_PLATFORM})
add_compile_definitions(
SIM_PLATFORM=TRUE
)
else()
add_compile_definitions(
${MCU_NAME}=TRUE
USE_HAL_DRIVER=TRUE
)
endif()
if (MCU_NAME MATCHES "^(STM32H5)[0-9]+xx")
add_subdirectory(mcu_support/stm32/h5xx)
endif()
if (MCU_NAME MATCHES "^(STM32F7)[0-9]+xx")
add_subdirectory(mcu_support/stm32/f7xx)
endif()
if (MCU_NAME MATCHES "^(STM32L4)[0-9]+xx")
add_subdirectory(mcu_support/stm32/l4xx)
endif()
if (BUILD_TARGET STREQUAL "Demo")
add_subdirectory(app/Demo)
elseif (BUILD_TARGET STREQUAL "echo")
add_subdirectory(app/echo)
elseif (BUILD_TARGET STREQUAL "cli_f7")
add_subdirectory(app/cli_f7)
elseif (BUILD_TARGET STREQUAL "cli_h5")
add_subdirectory(app/cli_h5)
elseif (BUILD_TARGET STREQUAL "cli_l4")
add_subdirectory(app/cli_l4)
elseif (BUILD_TARGET STREQUAL "minerva")
add_subdirectory(app/minerva)
elseif (BUILD_TARGET STREQUAL "sim")
add_subdirectory(app/sim)
endif()
add_subdirectory(mcu_support/cmsis)
add_subdirectory(common)