Merge branch 'fix/absent-component-error-message' into 'master'

fix(build): fix error message for absent component

See merge request espressif/esp-idf!32498
This commit is contained in:
Alexey Lapshin 2024-08-02 11:36:28 +08:00
commit b5261aec9b

View File

@ -293,9 +293,12 @@ endfunction()
#
function(__build_resolve_and_add_req var component_target req type)
__component_get_target(_req_target ${req})
__component_get_property(_component_name ${component_target} COMPONENT_NAME)
if(NOT _req_target)
message(FATAL_ERROR "Failed to resolve component '${req}' required by component '${_component_name}'.")
endif()
__component_get_property(_req_registered ${_req_target} __COMPONENT_REGISTERED)
if(NOT _req_target OR NOT _req_registered)
__component_get_property(_component_name ${component_target} COMPONENT_NAME)
if(NOT _req_registered)
message(FATAL_ERROR "Failed to resolve component '${req}' required by component '${_component_name}'.")
endif()
__component_set_property(${component_target} ${type} ${_req_target} APPEND)