From de9bf84501d9dabee4265ac4b254ea94cc588f3a Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 15 Sep 2023 10:24:43 -0700 Subject: [PATCH] meson: use a single dependency call for lua This is a newer Meson construct that allows passing multiple names for the same dependency to one call. One advantage of this is that if the first call (lua54) fails, it won't immediately fall back to a subproject and will try the others before falling back. Part-of: --- src/freedreno/meson.build | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/freedreno/meson.build b/src/freedreno/meson.build index 574110b0599..a5cdefbd01b 100644 --- a/src/freedreno/meson.build +++ b/src/freedreno/meson.build @@ -25,13 +25,8 @@ rnn_src_path = dir_source_root + '/src/freedreno/registers' rnn_install_path = get_option('datadir') + '/freedreno/registers' rnn_path = rnn_src_path + ':' + get_option('prefix') + '/' + rnn_install_path -# TODO: use multi-argument dependency() in meson 0.60 -foreach lua : ['lua54', 'lua53', 'lua52', 'lua'] - dep_lua = dependency(lua, required: false, fallback : ['lua', 'lua_dep'], version: '>=5.2') - if dep_lua.found() - break - endif -endforeach +dep_lua = dependency('lua54', 'lua53', 'lua52', 'lua', required: false, + fallback : ['lua', 'lua_dep'], version: '>=5.2') dep_libarchive = dependency('libarchive', fallback : ['libarchive', 'libarchive_dep'], required: false) dep_libxml2 = dependency('libxml-2.0', fallback: ['libxml2', 'libxml2_dep'], required: false)