mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'feat/cmakev2-backports-v6.0' into 'release/v6.0'
feat(cmakev2): sync pending v6.0 MRs for cmakev2 See merge request espressif/esp-idf!46778
This commit is contained in:
@@ -13,10 +13,26 @@ if( NOT CONFIG_ESP_WIFI_ENABLED
|
||||
"src/wifi_netif.c"
|
||||
"src/wifi_default_ap.c")
|
||||
|
||||
# In build system v2, idf_component_optional_requires() includes the target
|
||||
# component into the build immediately, so these stub sources are compiled
|
||||
# even on targets where Wi-Fi is not supported. The stubs need esp_event and
|
||||
# esp_netif headers, so those dependencies must be declared here for v2.
|
||||
#
|
||||
# In build system v1, idf_component_optional_requires() only links a
|
||||
# component that is already part of the build. On non-Wi-Fi targets, this
|
||||
# component is never pulled in, so the stubs are never compiled and the
|
||||
# dependencies are not needed. Additionally, the CMAKE_BUILD_EARLY_EXPANSION
|
||||
# guard ensures that the stubs are not compiled for v1.
|
||||
set(priv_reqs "")
|
||||
if(IDF_BUILD_V2)
|
||||
set(priv_reqs "esp_event" "esp_netif")
|
||||
endif()
|
||||
|
||||
# This component provides "esp_wifi" "wifi_apps/nan_app" headers if WiFi not enabled
|
||||
# (implementation supported optionally in a managed component esp_wifi_remote)
|
||||
idf_component_register(SRCS "${srcs}"
|
||||
INCLUDE_DIRS "include" "wifi_apps/nan_app/include")
|
||||
INCLUDE_DIRS "include" "wifi_apps/nan_app/include"
|
||||
PRIV_REQUIRES ${priv_reqs})
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user