mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
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:
@@ -158,7 +158,8 @@ function(nuttx_generate_kconfig)
|
|||||||
if(EXISTS ${NUTTX_APPS_BINDIR}/${MENUCONFIG})
|
if(EXISTS ${NUTTX_APPS_BINDIR}/${MENUCONFIG})
|
||||||
file(APPEND ${KCONFIG_OUTPUT_FILE}
|
file(APPEND ${KCONFIG_OUTPUT_FILE}
|
||||||
"source \"${NUTTX_APPS_BINDIR}/${MENUCONFIG}\"\n")
|
"source \"${NUTTX_APPS_BINDIR}/${MENUCONFIG}\"\n")
|
||||||
elseif(EXISTS ${SUB_KCONFIG})
|
endif()
|
||||||
|
if(EXISTS ${SUB_KCONFIG})
|
||||||
file(APPEND ${KCONFIG_OUTPUT_FILE} "source \"${SUB_KCONFIG}\"\n")
|
file(APPEND ${KCONFIG_OUTPUT_FILE} "source \"${SUB_KCONFIG}\"\n")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
Reference in New Issue
Block a user