From 0dc7d46eb16fcd654eaa9dc4c36fc39e8004e7f7 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 18 Oct 2021 14:44:13 +0000 Subject: [PATCH] fix: Only search for board one not found yet. --- app/cmake/zmk_config.cmake | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/cmake/zmk_config.cmake b/app/cmake/zmk_config.cmake index 4cf43e08..27c25dcf 100644 --- a/app/cmake/zmk_config.cmake +++ b/app/cmake/zmk_config.cmake @@ -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)