forked from simonjwright/FreeRTOS-Ada
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
35 lines (29 loc) · 1.11 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
# Read GNAT RTL object files list
file(READ ${COMPONENT_DIR}/esp32/obj_list.txt OBJ)
list(TRANSFORM OBJ STRIP)
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
# Build GNAT RTS in ${BUILD_DIR}/rts without *.c
# Make full name object files list
list(TRANSFORM OBJ PREPEND ${COMPONENT_DIR}/ REGEX "." OUTPUT_VARIABLE FULL)
# run gprbuild and gprinstall
add_custom_command(OUTPUT ${FULL}
COMMAND gprbuild -p -P ${COMPONENT_DIR}/esp32/build_runtime.gpr
--db ${COMPONENT_DIR}/gprconfig
--autoconf=${BUILD_DIR}/config.cgpr
&& gprinstall -f -p -P ${COMPONENT_DIR}/esp32/build_runtime.gpr
--prefix=${BUILD_DIR}/rts
--autoconf=${BUILD_DIR}/config.cgpr
VERBATIM)
endif()
idf_component_register(
SRCS
"common/adaint.c"
"common/freertos_bindings.c"
"common/last_chance_handler.c"
"common/vApplicationStackOverflowHook.c"
${OBJ}
REQUIRES freertos)
idf_component_get_property(FREERTOS_ORIG_INCLUDE_PATH freertos
ORIG_INCLUDE_PATH)
target_include_directories (${COMPONENT_LIB} PRIVATE
${FREERTOS_ORIG_INCLUDE_PATH})