mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
c91597454d
Add the PROJECT_COMPONENTS_SOURCE build property to control how project components are categorised during component discovery. By default it is set to "project_components" (priority 3 - highest), preserving the existing behaviour. Setting it to "idf_components" (priority 0) before calling idf_project_init() makes the project's built-in components overridable by user-supplied components through EXTRA_COMPONENT_DIRS (priority 2). This is needed for sub-projects like the bootloader, whose built-in components (e.g. main) are provided by ESP-IDF and should be overridable by user-supplied components placed in bootloader_components/. The cmakev1 build system allowed this override because it used a last-one-wins strategy, but cmakev2 uses strict priority-based component resolution where project_components always win. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>