cmake: move shield board/conf handling

Move handling for shield boards/board.overlay, shield.conf and
boards/board.conf inside the SHIELD_LIST check.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-09-11 12:06:43 -05:00 committed by Kumar Gala
commit 88c4cd8273

View file

@ -309,36 +309,36 @@ foreach(root ${BOARD_ROOT})
shield_dts_fixups
${shield_dir}/${s}/dts_fixup.h
)
# search for shield/boards/board.overlay file
if(EXISTS ${shield_dir}/${s}/boards/${BOARD}.overlay)
# add shield/board overlay to the shield overlays list
list(APPEND
shield_dts_files
${shield_dir}/${s}/boards/${BOARD}.overlay
)
endif()
# search for shield/shield.conf file
if(EXISTS ${shield_dir}/${s}/${s}.conf)
# add shield.conf to the shield config list
list(APPEND
shield_conf_files
${shield_dir}/${s}/${s}.conf
)
endif()
# search for shield/boards/board.conf file
if(EXISTS ${shield_dir}/${s}/boards/${BOARD}.conf)
# add HW specific board.conf to the shield config list
list(APPEND
shield_conf_files
${shield_dir}/${s}/boards/${BOARD}.conf
)
endif()
else()
list(APPEND NOT_FOUND_SHIELD_LIST ${s})
endif()
# search for shield/boards/board.overlay file
if(EXISTS ${shield_dir}/${s}/boards/${BOARD}.overlay)
# add shield/board overlay to the shield overlays list
list(APPEND
shield_dts_files
${shield_dir}/${s}/boards/${BOARD}.overlay
)
endif()
# search for shield/shield.conf file
if(EXISTS ${shield_dir}/${s}/${s}.conf)
# add shield.conf to the shield config list
list(APPEND
shield_conf_files
${shield_dir}/${s}/${s}.conf
)
endif()
# search for shield/boards/board.conf file
if(EXISTS ${shield_dir}/${s}/boards/${BOARD}.conf)
# add HW specific board.conf to the shield config list
list(APPEND
shield_conf_files
${shield_dir}/${s}/boards/${BOARD}.conf
)
endif()
endforeach()
endif()
endforeach()