mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-19 14:26:01 -04:00
Change(component.cmake): check for missing component_target
This commit is contained in:
parent
0479494e7a
commit
9d1bf49497
@ -376,10 +376,14 @@ endmacro()
|
|||||||
function(idf_component_get_property var component property)
|
function(idf_component_get_property var component property)
|
||||||
cmake_parse_arguments(_ "GENERATOR_EXPRESSION" "" "" ${ARGN})
|
cmake_parse_arguments(_ "GENERATOR_EXPRESSION" "" "" ${ARGN})
|
||||||
__component_get_target(component_target ${component})
|
__component_get_target(component_target ${component})
|
||||||
if(__GENERATOR_EXPRESSION)
|
if("${component_target}" STREQUAL "")
|
||||||
set(val "$<TARGET_PROPERTY:${component_target},${property}>")
|
message(FATAL_ERROR "Component ${component} not found")
|
||||||
else()
|
else()
|
||||||
__component_get_property(val ${component_target} ${property})
|
if(__GENERATOR_EXPRESSION)
|
||||||
|
set(val "$<TARGET_PROPERTY:${component_target},${property}>")
|
||||||
|
else()
|
||||||
|
__component_get_property(val ${component_target} ${property})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(${var} "${val}" PARENT_SCOPE)
|
set(${var} "${val}" PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
Loading…
Reference in New Issue
Block a user