mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
change(examples): explicitly specify component dependencies for examples
Currently, several examples do not explicitly state their component dependencies, relying instead on the default behavior that includes all registered components and commonly required ones in the build. Explicitly adding component dependencies can reduce build time when set(COMPONENTS main) is used. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
idf_build_get_property(target IDF_TARGET)
|
||||
|
||||
if(${target} STREQUAL "linux")
|
||||
set(requires esp_event esp_stubs protocol_examples_common nvs_flash)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_EXAMPLE_IPV4}" STREQUAL y)
|
||||
set(tcp_client_ip tcp_client_v4.c)
|
||||
else()
|
||||
@@ -12,4 +8,4 @@ endif()
|
||||
|
||||
idf_component_register(SRCS "tcp_client_main.c" "${tcp_client_ip}"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES ${requires})
|
||||
PRIV_REQUIRES unity nvs_flash esp_netif)
|
||||
|
Reference in New Issue
Block a user