From 52c5cf77586f4cb208932d129bec990c7b869748 Mon Sep 17 00:00:00 2001 From: gojimmypi Date: Thu, 20 Jun 2024 13:02:23 +0200 Subject: [PATCH] change(component.cmake): check for missing component_target --- tools/cmake/component.cmake | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/cmake/component.cmake b/tools/cmake/component.cmake index 1046364aca12..6db7278e8c2b 100644 --- a/tools/cmake/component.cmake +++ b/tools/cmake/component.cmake @@ -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 "$") + 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 "$") + else() + __component_get_property(val ${component_target} ${property}) + endif() endif() set(${var} "${val}" PARENT_SCOPE) endfunction()