From 242a52bb07deba2e524f8265b17b053af3ca7894 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Mon, 18 Sep 2023 10:51:38 +0530 Subject: [PATCH] [ESP32] Append to chip_libraries list only if present in (#29281) BUILD_COMPONENTS and fix some indentation. --- config/esp32/components/chip/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 61920102605cba..13beac09ce2153 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -486,12 +486,12 @@ endforeach() set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos) idf_build_get_property(build_components BUILD_COMPONENTS) foreach(component ${components_to_link}) - # Some of the components are not present in IDF v4.x - # So, Check if the component is in the list of build components - if("${component}" IN_LIST build_components) + # Some of the components are not present in IDF v4.x + # So, Check if the component is in the list of build components + if("${component}" IN_LIST build_components) idf_component_get_property(lib_name ${component} COMPONENT_LIB) + list(APPEND chip_libraries $) endif() - list(APPEND chip_libraries $) endforeach() target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group