Fix flat struct when shield is located in main config dir

This commit is contained in:
dumam 2021-11-07 03:18:14 +01:00
parent 5216938ab3
commit f4b6e6c380

View file

@ -71,7 +71,7 @@ foreach(root ${BOARD_ROOT})
if (NOT DEFINED BOARD_DIR_NAME) if (NOT DEFINED BOARD_DIR_NAME)
find_path(BOARD_DIR find_path(BOARD_DIR
NAMES ${BOARD}_defconfig NAMES ${BOARD}_defconfig
PATHS ${root}/boards/*/* PATHS ${root}/boards/*/* ${root}/boards
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
if(BOARD_DIR) if(BOARD_DIR)
@ -83,7 +83,7 @@ foreach(root ${BOARD_ROOT})
if(DEFINED SHIELD) if(DEFINED SHIELD)
find_path(shields_refs_list find_path(shields_refs_list
NAMES ${SHIELD}.overlay NAMES ${SHIELD}.overlay
PATHS ${root}/boards/shields/* PATHS ${root}/boards/shields/* ${root}
NO_DEFAULT_PATH) NO_DEFAULT_PATH)
foreach(shield_path ${shields_refs_list}) foreach(shield_path ${shields_refs_list})
get_filename_component(SHIELD_DIR_NAME ${shield_path} NAME) get_filename_component(SHIELD_DIR_NAME ${shield_path} NAME)