esp-idf/components/log/CMakeLists.txt

28 lines
787 B
CMake
Raw Normal View History

idf_build_get_property(target IDF_TARGET)
2024-03-11 09:44:33 -04:00
set(srcs "")
set(priv_requires "")
2024-03-11 09:44:33 -04:00
if(BOOTLOADER_BUILD)
list(APPEND srcs "log_noos.c")
else()
2024-03-11 09:44:33 -04:00
list(APPEND srcs "log.c")
if(${target} STREQUAL "linux")
list(APPEND srcs "log_linux.c")
else()
list(APPEND srcs "log_freertos.c")
list(APPEND priv_requires soc hal esp_hw_support)
endif()
# Buffer APIs call ESP_LOG_LEVEL -> esp_log_write, which can not used in bootloader.
list(APPEND srcs "src/buffer/log_buffers.c"
"src/util.c")
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS "include"
2024-03-11 09:44:33 -04:00
PRIV_INCLUDE_DIRS "include/esp_private"
LDFRAGMENTS linker.lf
PRIV_REQUIRES ${priv_requires})