diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 0891364b4377..4f99b78ecb40 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -2,14 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) set(CONFIG_APPLICATION_DEFINED_SYSCALL true) -# Add our custom Zephyr module for drivers w/ syscalls, etc. -list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr) - -set(ZephyrBuildConfiguration_ROOT ${CMAKE_SOURCE_DIR}/cmake) - -list(APPEND ZEPHYR_EXTRA_MODULES - ${CMAKE_CURRENT_SOURCE_DIR}/module -) +set(ZEPHYR_EXTRA_MODULES "${ZMK_EXTRA_MODULES};${CMAKE_CURRENT_SOURCE_DIR}/module;${CMAKE_CURRENT_SOURCE_DIR}/keymap-module") # Find Zephyr. This also loads Zephyr's build system. find_package(Zephyr REQUIRED HINTS ../zephyr) diff --git a/app/cmake/ZephyrBuildConfig.cmake b/app/keymap-module/modules/modules.cmake similarity index 99% rename from app/cmake/ZephyrBuildConfig.cmake rename to app/keymap-module/modules/modules.cmake index ade341990a06..e260da8fc370 100644 --- a/app/cmake/ZephyrBuildConfig.cmake +++ b/app/keymap-module/modules/modules.cmake @@ -5,8 +5,6 @@ # * single overlay, # * or per board/shield. -cmake_minimum_required(VERSION 3.15) - list(APPEND BOARD_ROOT ${APPLICATION_SOURCE_DIR}) list(APPEND DTS_ROOT ${APPLICATION_SOURCE_DIR}) diff --git a/app/keymap-module/zephyr/module.yml b/app/keymap-module/zephyr/module.yml new file mode 100644 index 000000000000..9daa3a18e442 --- /dev/null +++ b/app/keymap-module/zephyr/module.yml @@ -0,0 +1,5 @@ +# This ensures our modules/modules.cmake file is loaded *after* all the other modules, +# To set up the various keymap DTS and overridden .conf files are located and chosen. +build: + settings: + module_ext_root: "."