-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
107 lines (81 loc) · 3.32 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Create interface library for hardware independent MicroTBX sources.
add_library(microtbx INTERFACE)
target_sources(microtbx INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/tbx_aes256.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbx_assert.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbx_checksum.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbx_critsect.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbx_crypto.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbx_heap.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbx_list.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbx_mempool.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbx_platform.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbx_random.c"
)
target_include_directories(microtbx INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source"
)
# Create interface library for Cortex-M port specific sources.
add_library(microtbx-cortexm INTERFACE)
target_sources(microtbx-cortexm INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/port/ARM_CORTEXM/tbx_port.c"
"${CMAKE_CURRENT_LIST_DIR}/source/port/ARM_CORTEXM/GCC/tbx_comp.s"
)
target_include_directories(microtbx-cortexm INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/port/ARM_CORTEXM"
"${CMAKE_CURRENT_LIST_DIR}/source/port/ARM_CORTEXM/GCC"
)
# Create interface library for Raspberry PI Pico RP2040 port specific sources.
add_library(microtbx-rp2040 INTERFACE)
target_sources(microtbx-rp2040 INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/port/RP2040/tbx_port.c"
)
target_include_directories(microtbx-rp2040 INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/port/RP2040"
)
# Create interface library for AVR port specific sources.
add_library(microtbx-avr INTERFACE)
target_sources(microtbx-avr INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/port/AVR/GCC/tbx_port.c"
)
target_include_directories(microtbx-avr INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/port/AVR"
"${CMAKE_CURRENT_LIST_DIR}/source/port/AVR/GCC"
)
# Create interface library for Linux port specific sources.
add_library(microtbx-linux INTERFACE)
target_sources(microtbx-linux INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/port/LINUX/tbx_port.c"
)
target_include_directories(microtbx-linux INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/port/LINUX"
)
# Create interface library for FreeRTOS extra sources.
add_library(microtbx-extra-freertos INTERFACE)
target_sources(microtbx-extra-freertos INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/extra/freertos/tbx_freertos.c"
)
target_include_directories(microtbx-extra-freertos INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/extra/freertos"
)
# Create interface library for C++ extra sources.
add_library(microtbx-extra-cpp INTERFACE)
target_sources(microtbx-extra-cpp INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/extra/cplusplus/tbxcxx.cpp"
)
target_include_directories(microtbx-extra-cpp INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/extra/cplusplus"
)
# Create interface library for the unit test specific sources.
add_library(microtbx-tests INTERFACE)
target_sources(microtbx-tests INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/tests/unittests.c"
)
target_include_directories(microtbx-tests INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/tests"
)
# Create interface library for the template. Only used for MISRA check.
add_library(microtbx-template INTERFACE)
target_include_directories(microtbx-template INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/template"
)