mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
The `idf_build_generate_metadata()` function is used to generate project metadata, specifically the `project_description.json` file, for a given executable target. The output file path can be specified as an argument to the function, allowing metadata generation for multiple executables. It identifies the library, created by the `idf_build_library` function, that is linked to the executable based on the `LINK_LIBRARIES` executable target property. The `LIBRARY_INTERFACES` build property tracks all library interfaces created with the `idf_build_library` function, so the targets in the `LINK_LIBRARIES` executable property are checked against this list to find the library. The library contains information about components linked to it in the `LIBRARY_COMPONENTS_LINKED` library property. These components are processed and added to the `build_component_info` dictionary in the `project_description.json` along with other information. Note that, compared to cmakev1, the `all_component_info` dictionary in `project_description` does not include some information by default, such as included directories. This information is available in cmakev1 due to early component evaluation, which is not done in cmakev2. This will likely require some adjustments on the hints side. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>