From bccd30d68ad0f44113f477bcc3e57486b72ea02a Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Wed, 22 Jul 2020 19:42:05 -0400 Subject: [PATCH] Add user config as board/dts roots as needed. --- app/cmake/zmk_config.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/cmake/zmk_config.cmake b/app/cmake/zmk_config.cmake index 84a50340..2ae0a72d 100644 --- a/app/cmake/zmk_config.cmake +++ b/app/cmake/zmk_config.cmake @@ -43,6 +43,15 @@ endif() # Store the selected user_config in the cache set(CACHED_ZMK_CONFIG ${ZMK_CONFIG} CACHE STRING "Selected user ZMK config") +if (ZMK_CONFIG) + if(EXISTS "${ZMK_CONFIG}/boards") + list(APPEND BOARD_ROOT "${ZMK_CONFIG}") + endif() + if(EXISTS "${ZMK_CONFIG}/dts") + list(APPEND DTS_ROOT "${ZMK_CONFIG}") + endif() +endif() + foreach(root ${BOARD_ROOT}) if (EXISTS "${root}/boards/${BOARD}.overlay") list(APPEND ZMK_DTC_FILES "${root}/boards/${BOARD}.overlay")