Skip to content

Commit

Permalink
change(component.cmake): check for missing component_target
Browse files Browse the repository at this point in the history
  • Loading branch information
gojimmypi committed Jun 20, 2024
1 parent 0479494 commit 52c5cf7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tools/cmake/component.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,17 @@ endmacro()
function(idf_component_get_property var component property)
cmake_parse_arguments(_ "GENERATOR_EXPRESSION" "" "" ${ARGN})
__component_get_target(component_target ${component})
if(__GENERATOR_EXPRESSION)
set(val "$<TARGET_PROPERTY:${component_target},${property}>")
if("${component_target}" STREQUAL "")
if("${component}" STREQUAL "esp-wolfssl")
message(STATUS "Component esp-wolfssl needs to be installed. See api-reference/protocols/esp_tls docs.")
endif()
message(FATAL_ERROR "Component ${component} not found")
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()
set(${var} "${val}" PARENT_SCOPE)
endfunction()
Expand Down

0 comments on commit 52c5cf7

Please sign in to comment.