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 <wangchengdong@lixiang.com>
This commit is contained in:
wangchengdong
2025-11-19 15:41:51 +08:00
committed by archer
parent f641298d9e
commit fd70e5f947

View File

@@ -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()