esp-idf/components/esp_event/CMakeLists.txt

33 wiersze
1.1 KiB
CMake
Czysty Zwykły widok Historia

idf_build_get_property(target IDF_TARGET)
set(priv_include_dirs "private_include")
set(priv_requires "")
set(requires "log" "esp_common" "freertos")
set(srcs "default_event_loop.c"
"esp_event.c"
"esp_event_private.c")
if(${target} STREQUAL "linux")
list(APPEND requires "linux")
# Temporary fix until esp_system is available for linux, too
2021-08-10 03:50:15 +00:00
list(APPEND priv_include_dirs "$ENV{IDF_PATH}/tools/mocks/esp_system/include")
else()
list(APPEND requires "esp_netif")
if(${target} STREQUAL "esp32")
list(APPEND priv_requires esp_eth esp_timer)
else()
list(APPEND priv_requires esp_timer)
endif()
endif()
2018-10-26 05:14:19 +00:00
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS "include"
PRIV_INCLUDE_DIRS ${priv_include_dirs}
REQUIRES ${requires}
PRIV_REQUIRES ${priv_requires}
LDFRAGMENTS linker.lf)
2019-11-05 11:20:26 +00:00
if(CONFIG_ESP_EVENT_LOOP_PROFILING)
# uses C11 atomic feature
set_source_files_properties(esp_event.c PROPERTIES COMPILE_FLAGS -std=gnu11)
endif()