diff --git a/tools/test_apps/system/g0_components/CMakeLists.txt b/tools/test_apps/system/g0_components/CMakeLists.txt index 8b22859e738..8e03f18b357 100644 --- a/tools/test_apps/system/g0_components/CMakeLists.txt +++ b/tools/test_apps/system/g0_components/CMakeLists.txt @@ -70,7 +70,12 @@ set(expected_components set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nostdlib") # Get all the components that were required to initialize this project -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() # Sort lists to be able to compare them literally list(SORT expected_components)