Skip to content

Commit ae52f4e

Browse files
authored
Fix compiling examples with insights (project-chip#34571)
1 parent 9ab4123 commit ae52f4e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

config/esp32/components/chip/CMakeLists.txt

+9-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,15 @@ if (CONFIG_SEC_CERT_DAC_PROVIDER)
468468
endif()
469469

470470
if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE)
471-
idf_component_get_property(esp_insights_lib espressif__esp_insights COMPONENT_LIB)
471+
idf_build_get_property(build_components BUILD_COMPONENTS)
472+
# esp_insights can be used as an independent component or through component manager so,
473+
# We should check and add the right component.
474+
if("espressif__esp_insights" IN_LIST build_components)
475+
idf_component_get_property(esp_insights_lib espressif__esp_insights COMPONENT_LIB)
476+
elseif("esp_insights" IN_LIST build_components)
477+
idf_component_get_property(esp_insights_lib esp_insights COMPONENT_LIB)
478+
endif()
479+
472480
list(APPEND chip_libraries $<TARGET_FILE:${esp_insights_lib}>)
473481
endif()
474482

0 commit comments

Comments
 (0)