@ -44,13 +44,13 @@ endif()
@@ -44,13 +44,13 @@ endif()
set ( CACHED_ZMK_CONFIG ${ ZMK_CONFIG } CACHE STRING "Selected user ZMK config" )
if ( ZMK_CONFIG )
if ( EXISTS "${ZMK_CONFIG}/boards" )
if ( EXISTS ${ ZMK_CONFIG } /boards )
message ( STATUS "Adding ZMK config directory as board root: ${ZMK_CONFIG}" )
list ( APPEND BOARD_ROOT "${ZMK_CONFIG}" )
list ( APPEND BOARD_ROOT ${ ZMK_CONFIG } )
endif ( )
if ( EXISTS "${ZMK_CONFIG}/dts" )
if ( EXISTS ${ ZMK_CONFIG } /dts )
message ( STATUS "Adding ZMK config directory as DTS root: ${ZMK_CONFIG}" )
list ( APPEND DTS_ROOT "${ZMK_CONFIG}" )
list ( APPEND DTS_ROOT ${ ZMK_CONFIG } )
endif ( )
endif ( )
@ -76,6 +76,7 @@ foreach(root ${BOARD_ROOT})
@@ -76,6 +76,7 @@ foreach(root ${BOARD_ROOT})
N O _ D E F A U L T _ P A T H
)
foreach ( shield_path ${ shields_refs_list } )
get_filename_component ( SHIELD_DIR ${ shield_path } NAME )
if ( EXISTS "${shield_path}/keymap" )
list ( APPEND KEYMAP_DIRS ${ shield_path } /keymap )
endif ( )
@ -101,7 +102,7 @@ if (BASE_KEYMAPS_DIR)
@@ -101,7 +102,7 @@ if (BASE_KEYMAPS_DIR)
endif ( )
if ( ZMK_CONFIG )
if ( EXISTS "${ZMK_CONFIG}" )
if ( EXISTS ${ ZMK_CONFIG } )
message ( STATUS "ZMK Config directory: ${ZMK_CONFIG}" )
list ( APPEND DTS_ROOT ${ ZMK_CONFIG } )
if ( EXISTS "${ZMK_CONFIG}/include" )
@ -109,8 +110,13 @@ if (ZMK_CONFIG)
@@ -109,8 +110,13 @@ if (ZMK_CONFIG)
endif ( )
if ( SHIELD )
message ( STATUS "Board: ${BOARD}, ${BOARD_DIR}, ${SHIELD}, ${SHIELD_DIR}" )
list ( APPEND overlay_candidates "${ZMK_CONFIG}/${SHIELD_DIR}.overlay" )
list ( APPEND overlay_candidates "${ZMK_CONFIG}/${SHIELD_DIR}_${BOARD}.overlay" )
list ( APPEND overlay_candidates "${ZMK_CONFIG}/${SHIELD}_${BOARD}.overlay" )
list ( APPEND overlay_candidates "${ZMK_CONFIG}/${SHIELD}.overlay" )
list ( APPEND config_candidates "${ZMK_CONFIG}/${SHIELD_DIR}.conf" )
list ( APPEND config_candidates "${ZMK_CONFIG}/${SHIELD_DIR}_${BOARD}.conf" )
list ( APPEND config_candidates "${ZMK_CONFIG}/${SHIELD}_${BOARD}.conf" )
list ( APPEND config_candidates "${ZMK_CONFIG}/${SHIELD}.conf" )
endif ( )