diff --git a/tools/test_apps/protocols/netif_components/CMakeLists.txt b/tools/test_apps/protocols/netif_components/CMakeLists.txt index e5eee571d9c..cf2be268054 100644 --- a/tools/test_apps/protocols/netif_components/CMakeLists.txt +++ b/tools/test_apps/protocols/netif_components/CMakeLists.txt @@ -56,7 +56,12 @@ idf_build_set_property(__BUILD_COMPONENT_DEPGRAPH_ENABLED 1) project(network_components) # Get the actual build components included in the build -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() message(STATUS "Build components needed my main and ${component_under_test}:") foreach(comp ${build_components})