I'm using my own custom component. Now I wanted to require components only in a specific config case. That doesn't seem to work:
Using this config (part):
Code: Select all
set(COMPONENT_REQUIRES nvs_flash )
message("components 1: " "${COMPONENT_REQUIRES}")
message("config :" ${CONFIG_ESP32_HAP_STACK_IP})
if(CONFIG_ESP32_HAP_STACK_IP)
list(APPEND COMPONENT_REQUIRES mdns)
message("components 2: " "${COMPONENT_REQUIRES}")
endif()
components 1: nvs_flash
config :y
components 2: nvs_flash;mdns
-- Components: app_trace app_update bootloader bootloader_support cxx driver efuse esp32 esp32_hap esp_common esp_eth esp_event esp_ringbuf esp_rom esp_wifi espcoredump esptool_py freertos heap log lwip main mbedtls newlib nvs_flash partition_table pthread soc spi_flash tcpip_adapter vfs wpa_supplicant xtensa
Changing the config to that:
Code: Select all
set(COMPONENT_REQUIRES nvs_flash )
message("components 1: " "${COMPONENT_REQUIRES}")
list(APPEND COMPONENT_REQUIRES mdns) # This line was moved!!!
message("config :" ${CONFIG_ESP32_HAP_STACK_IP})
if(CONFIG_ESP32_HAP_STACK_IP)
message("components 2: " "${COMPONENT_REQUIRES}")
endif()
components 1: nvs_flash
config :y
components 2: nvs_flash;mdns
-- Components: app_trace app_update bootloader bootloader_support console cxx driver efuse esp32 esp32_hap esp_common esp_eth esp_event esp_ringbuf esp_rom esp_wifi espcoredump esptool_py freertos heap log lwip main mbedtls mdns newlib nvs_flash partition_table pthread soc spi_flash tcpip_adapter vfs wpa_supplicant xtensa
So even if the list is extended, the config system does not take it into account. Why?
Best regards,
Torsten