2021-07-21 00:07:53 -04:00
|
|
|
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-09 23:50:15 -04:00
|
|
|
list(APPEND priv_include_dirs "$ENV{IDF_PATH}/tools/mocks/esp_system/include")
|
2019-08-07 23:44:24 -04:00
|
|
|
else()
|
2021-07-21 00:07:53 -04:00
|
|
|
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()
|
2019-05-27 02:29:43 -04:00
|
|
|
endif()
|
2018-10-26 01:14:19 -04:00
|
|
|
|
2021-07-21 00:07:53 -04:00
|
|
|
idf_component_register(SRCS ${srcs}
|
2019-04-28 03:38:23 -04:00
|
|
|
INCLUDE_DIRS "include"
|
2021-07-21 00:07:53 -04:00
|
|
|
PRIV_INCLUDE_DIRS ${priv_include_dirs}
|
|
|
|
REQUIRES ${requires}
|
2019-08-07 23:44:24 -04:00
|
|
|
PRIV_REQUIRES ${priv_requires}
|
2019-04-28 03:38:23 -04:00
|
|
|
LDFRAGMENTS linker.lf)
|
2019-02-15 08:28:24 -05:00
|
|
|
|
2019-11-05 06:20:26 -05:00
|
|
|
if(CONFIG_ESP_EVENT_LOOP_PROFILING)
|
2019-02-15 08:28:24 -05:00
|
|
|
# uses C11 atomic feature
|
|
|
|
set_source_files_properties(esp_event.c PROPERTIES COMPILE_FLAGS -std=gnu11)
|
2019-04-29 06:54:02 -04:00
|
|
|
endif()
|