cmake/sched: fix build break based on mainline

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-07-10 09:57:56 +08:00
committed by Xiang Xiao
parent 225740b1b7
commit de7132c697
4 changed files with 47 additions and 25 deletions

View File

@@ -65,6 +65,13 @@ if(NOT DEFINED BOARD_CONFIG)
message(FATAL_ERROR "Please define configuration with BOARD_CONFIG")
endif()
find_program(KCONFIGLIB olddefconfig)
if(NOT KCONFIGLIB)
message(
FATAL_ERROR "Kconfig environment depends on kconfiglib, Please install:
$ pip install kconfiglib")
endif()
if(EXISTS ${BOARD_CONFIG} AND EXISTS ${BOARD_CONFIG}/defconfig)
get_filename_component(NUTTX_BOARD_ABS_DIR ${BOARD_CONFIG} ABSOLUTE BASE_DIR
${NUTTX_DIR})