fix: Only search for board one not found yet.

This commit is contained in:
Peter Johanson 2021-10-18 14:44:13 +00:00 committed by Pete Johanson
parent 742f4c2826
commit 0dc7d46eb1
1 changed files with 10 additions and 8 deletions

View File

@ -61,14 +61,16 @@ foreach(root ${BOARD_ROOT})
if (EXISTS "${root}/boards/${BOARD}.overlay")
list(APPEND ZMK_DTC_FILES "${root}/boards/${BOARD}.overlay")
endif()
find_path(BOARD_DIR
NAMES ${BOARD}_defconfig
PATHS ${root}/boards/*/*
NO_DEFAULT_PATH
)
if(BOARD_DIR)
get_filename_component(BOARD_DIR_NAME ${BOARD_DIR} NAME)
list(APPEND KEYMAP_DIRS ${BOARD_DIR})
if (NOT DEFINED BOARD_DIR)
find_path(BOARD_DIR
NAMES ${BOARD}_defconfig
PATHS ${root}/boards/*/*
NO_DEFAULT_PATH
)
if(BOARD_DIR)
get_filename_component(BOARD_DIR_NAME ${BOARD_DIR} NAME)
list(APPEND KEYMAP_DIRS ${BOARD_DIR})
endif()
endif()
if(DEFINED SHIELD)