From 3b10e00d276537a4f5b0e81b8117295057986041 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sat, 16 May 2020 20:02:27 -0400 Subject: [PATCH] Fixes for finding keymap directory. --- cmake/keymap.cmake | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/cmake/keymap.cmake b/cmake/keymap.cmake index b7039f38..e580e1ea 100644 --- a/cmake/keymap.cmake +++ b/cmake/keymap.cmake @@ -76,16 +76,13 @@ foreach(root ${BOARD_ROOT}) endif() endforeach() -foreach(keymap_root ${KEYMAP_DIRS}) - find_path(KEYMAP_DIR - NAMES ${KEYMAP} - PATHS ${keymap_root}/*/* - NO_DEFAULT_PATH - ) +find_path(KEYMAP_DIR + NAMES ${KEYMAP}/keymap.overlay + PATHS ${KEYMAP_DIRS} + NO_DEFAULT_PATH +) - if (KEYMAP_DIR) - message(STATUS "Using keymap directory: ${KEYMAP_DIR}/${KEYMAP}/") - set(DTC_OVERLAY_FILE ${KEYMAP_DIR}/${KEYMAP}/keymap.overlay) - break() - endif() -endforeach() +if (KEYMAP_DIR) + message(STATUS "Using keymap directory: ${KEYMAP_DIR}/${KEYMAP}/") + set(DTC_OVERLAY_FILE ${KEYMAP_DIR}/${KEYMAP}/keymap.overlay) +endif()