Files
ESP8266_RTOS_SDK/components/esp_common/CMakeLists.txt
Dong Heng 622482eb76 feat(esp_common): update esp_common
1. add Kconfig file and rename old global macro
2. move some independent files to esp_common
2020-01-15 14:56:39 +08:00

18 lines
770 B
CMake

if(BOOTLOADER_BUILD)
# For bootloader, all we need from esp_common is headers
idf_component_register(INCLUDE_DIRS include)
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections")
else()
# Regular app build
idf_component_register(SRCS "src/stack_check.c" "src/esp_err_to_name.c"
INCLUDE_DIRS include
PRIV_REQUIRES "tcpip_adapter")
set_source_files_properties(
"src/stack_check.c"
PROPERTIES COMPILE_FLAGS
-fno-stack-protector)
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_LIBRARIES "-Wl,--gc-sections")
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections")
endif()