diff --git a/tools/test_apps/system/g1_components/CMakeLists.txt b/tools/test_apps/system/g1_components/CMakeLists.txt index 3d7dfeab25b..26d1ebd22e0 100644 --- a/tools/test_apps/system/g1_components/CMakeLists.txt +++ b/tools/test_apps/system/g1_components/CMakeLists.txt @@ -126,7 +126,12 @@ set(expected_components list(SORT expected_components) -idf_build_get_property(build_components BUILD_COMPONENTS) +if(IDF_BUILD_V2) + get_target_property(library ${project_elf} LIBRARY_INTERFACE) + idf_library_get_property(build_components "${library}" LIBRARY_COMPONENTS_LINKED) +else() + idf_build_get_property(build_components BUILD_COMPONENTS) +endif() list(SORT build_components) if(NOT "${expected_components}" STREQUAL "${build_components}")