OVMS3-idf/components/xtensa/CMakeLists.txt

30 lines
870 B
CMake
Raw Normal View History

2020-02-19 11:31:54 +00:00
idf_build_get_property(target IDF_TARGET)
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"
2020-02-19 11:31:54 +00:00
"expression_with_stack_xtensa.c"
2019-08-09 05:26:49 +00:00
"eri.c"
2020-02-19 11:31:54 +00:00
"trax.c"
"${target}/trax_init.c"
)
2020-01-17 03:47:08 +00:00
if(IDF_TARGET STREQUAL "esp32s2")
list(APPEND srcs "stdatomic.c")
endif()
endif()
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()