From 505c481f6a087919c976c90efae27a2baf0ec7d3 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 5 Jun 2022 03:34:07 +0000 Subject: [PATCH] fix: Fixed conf file loading. * Properly locate conf files for the shield dir name. --- app/cmake/ZephyrBuildConfig.cmake | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/cmake/ZephyrBuildConfig.cmake b/app/cmake/ZephyrBuildConfig.cmake index 294098b4..469f5761 100644 --- a/app/cmake/ZephyrBuildConfig.cmake +++ b/app/cmake/ZephyrBuildConfig.cmake @@ -121,11 +121,11 @@ if(DEFINED SHIELD) list(LENGTH S_PIECES S_PIECES_LEN) while(NOT S_PIECES STREQUAL "") list(POP_BACK S_PIECES) - list(JOIN S_PIECES "_" S_SUBSTR) - if (S_SUBSTR STREQUAL ${shield_dir_name}) + list(JOIN S_PIECES "_" s_substr) + if ("%{s_substr}" STREQUAL "" OR "${s_substr}" STREQUAL ${shield_dir_name}) break() endif() - list(APPEND shield_candidate_names ${S_SUBSTR}) + list(APPEND shield_candidate_names ${s_substr}) endwhile() endforeach() endif() @@ -133,12 +133,11 @@ endif() if (ZMK_CONFIG) if (EXISTS ${ZMK_CONFIG}) message(STATUS "ZMK Config directory: ${ZMK_CONFIG}") - list(APPEND DTS_ROOT ${ZMK_CONFIG}) list(PREPEND KEYMAP_DIRS "${ZMK_CONFIG}") if (DEFINED SHIELD) - foreach (s ${shield_candidate_names}) - if (DEFINED $SHIELD_DIR_${s}) + foreach (s ${shield_candidate_names} ${SHIELD_AS_LIST}) + if (DEFINED ${SHIELD_DIR_${s}}) get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) endif() list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}_${BOARD}.overlay")