From 3679e1a216e72adb989d3097b738f3edc23bc387 Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Mon, 22 Sep 2025 19:01:02 +0200 Subject: [PATCH] feat(cmakev2): Store COMPONENT_OVERRIDEN_DIR property for components --- tools/cmakev2/component.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/cmakev2/component.cmake b/tools/cmakev2/component.cmake index a22530ebf82..b99d0b968c7 100644 --- a/tools/cmakev2/component.cmake +++ b/tools/cmakev2/component.cmake @@ -594,6 +594,10 @@ function(__init_component) # The newly added component has a higher priority than the existing # one. Since the component name and targets are identical, update # the existing component with the new directory and priority. + + # Store the overridden component directory (original component directory) for compatibility with cmakev1 + idf_component_set_property("${component_name}" COMPONENT_OVERRIDEN_DIR "${existing_component_directory}") + idf_component_set_property("${component_name}" COMPONENT_DIR "${component_directory}") idf_component_set_property("${component_name}" COMPONENT_SOURCE "${component_source}") idf_component_set_property("${component_name}" COMPONENT_PRIORITY ${component_priority})