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