[Kconfig] Change patern matching order so that xx_xx doesnut result xx if it exists

This commit is contained in:
Peter van der Perk 2021-08-18 17:20:24 +02:00 committed by Daniel Agar
parent b3e799e277
commit d4fbd5674e
1 changed files with 2 additions and 2 deletions

View File

@ -115,10 +115,10 @@ if(EXISTS ${BOARD_DEFCONFIG})
list(APPEND config_module_list drivers/${driver_p3_folder}/${driver_p3_subfolder}/${driver_p3_subsubfolder})
elseif(EXISTS ${PX4_SOURCE_DIR}/src/drivers/${driver_p1_folder}/${driver_p1_subfolder})
list(APPEND config_module_list drivers/${driver_p1_folder}/${driver_p1_subfolder})
elseif(EXISTS ${PX4_SOURCE_DIR}/src/drivers/${driver_p2_folder}/${driver_p2_subfolder})
list(APPEND config_module_list drivers/${driver_p2_folder}/${driver_p2_subfolder})
elseif(EXISTS ${PX4_SOURCE_DIR}/src/drivers/${driver_p4_folder}/${driver_p4_subfolder})
list(APPEND config_module_list drivers/${driver_p4_folder}/${driver_p4_subfolder})
elseif(EXISTS ${PX4_SOURCE_DIR}/src/drivers/${driver_p2_folder}/${driver_p2_subfolder})
list(APPEND config_module_list drivers/${driver_p2_folder}/${driver_p2_subfolder})
else()
message(FATAL_ERROR "Couldn't find path for ${driver}")
endif()