forked from espressif/esp-idf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
29 lines (26 loc) · 906 Bytes
/
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
if(BOOTLOADER_BUILD)
# bootloader only needs headers from this component
set(priv_requires soc)
else()
set(priv_requires soc freertos)
set(srcs "debug_helpers.c"
"debug_helpers_asm.S"
"expression_with_stack_xtensa_asm.S"
"expression_with_stack_xtensa.c"
"eri.c"
)
if(IDF_TARGET STREQUAL "esp32s2")
list(APPEND srcs "stdatomic.c")
endif()
if(IDF_TARGET STREQUAL "esp32")
list(APPEND srcs "trax.c")
endif()
endif()
idf_build_get_property(target IDF_TARGET)
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS include ${target}/include
LDFRAGMENTS linker.lf
PRIV_REQUIRES ${priv_requires})
if(NOT BOOTLOADER_BUILD)
target_link_libraries(${COMPONENT_LIB} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${target}/libhal.a")
endif()