summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-05-16 20:02:27 -0400
committerPete Johanson <peter@peterjohanson.com>2020-05-16 20:02:27 -0400
commit3b10e00d276537a4f5b0e81b8117295057986041 (patch)
treef1812326d6e481e8ec2e657acaee3d141a2640c6
parent0494f6a8c264fda7daa3e853671310ad6a032a0f (diff)
Fixes for finding keymap directory.
-rw-r--r--cmake/keymap.cmake23
1 files changed, 10 insertions, 13 deletions
diff --git a/cmake/keymap.cmake b/cmake/keymap.cmake
index b7039f3..e580e1e 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
- )
-
- if (KEYMAP_DIR)
- message(STATUS "Using keymap directory: ${KEYMAP_DIR}/${KEYMAP}/")
- set(DTC_OVERLAY_FILE ${KEYMAP_DIR}/${KEYMAP}/keymap.overlay)
- break()
- endif()
-endforeach()
+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)
+endif()