From fd70e5f947cb38f83503cc57b897e9cfb8368d9f Mon Sep 17 00:00:00 2001 From: wangchengdong Date: Wed, 19 Nov 2025 15:41:51 +0800 Subject: [PATCH] CMake: Enable both sub-Kconfig and generated menu Kconfig Currently, nuttx_generate_kconfig() allows a subdirectory to have either a handwritten sub-Kconfig or a generated menu Kconfig, but not both. This patch enables support for having both a sub-Kconfig and a generated menu Kconfig within the same subdirectory. Signed-off-by: Chengdong Wang --- cmake/nuttx_kconfig.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/nuttx_kconfig.cmake b/cmake/nuttx_kconfig.cmake index 4428f2f1117..085cbf1c0ca 100644 --- a/cmake/nuttx_kconfig.cmake +++ b/cmake/nuttx_kconfig.cmake @@ -158,7 +158,8 @@ function(nuttx_generate_kconfig) if(EXISTS ${NUTTX_APPS_BINDIR}/${MENUCONFIG}) file(APPEND ${KCONFIG_OUTPUT_FILE} "source \"${NUTTX_APPS_BINDIR}/${MENUCONFIG}\"\n") - elseif(EXISTS ${SUB_KCONFIG}) + endif() + if(EXISTS ${SUB_KCONFIG}) file(APPEND ${KCONFIG_OUTPUT_FILE} "source \"${SUB_KCONFIG}\"\n") endif() endforeach()