cmake: NUTTX_COMMON_DIR must be set after .config definitions are included

otherwise NUTTX_COMMON_DIR is empty if CONFIG_ARCH_BOARD_COMMON is set from menuconfig

Co-authored-by: hartmannathan <59230071+hartmannathan@users.noreply.github.com>
This commit is contained in:
raiden00pl 2023-12-12 15:14:33 +01:00 committed by Alan Carvalho de Assis
parent 7bcbaa5dc7
commit 267d039295
1 changed files with 9 additions and 9 deletions

View File

@ -262,15 +262,6 @@ else()
file(TOUCH ${CMAKE_BINARY_DIR}/drivers/platform/Kconfig)
endif()
# board common directory
if(CONFIG_ARCH_BOARD_COMMON)
file(
GLOB NUTTX_COMMON_DIR
LIST_DIRECTORIES true
"${NUTTX_DIR}/boards/${CONFIG_ARCH}/${CONFIG_ARCH_CHIP}/common")
endif()
# Custom chip ###################################################
if(CONFIG_ARCH_CHIP_CUSTOM)
@ -388,6 +379,15 @@ include(FetchContent)
set(FETCHCONTENT_QUIET OFF)
# Board common directory #####################################################
if(CONFIG_ARCH_BOARD_COMMON)
file(
GLOB NUTTX_COMMON_DIR
LIST_DIRECTORIES true
"${NUTTX_DIR}/boards/${CONFIG_ARCH}/${CONFIG_ARCH_CHIP}/common")
endif()
# Setup toolchain ############################################################
# This needs to happen before project() when binaries are searched for