meson: use allow_fallback instead of manually listing the deps and what they provide

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26834>
This commit is contained in:
Eric Engestrom
2023-12-28 10:04:13 +00:00
committed by Marge Bot
parent eb24e070bf
commit 753056fb94
2 changed files with 5 additions and 5 deletions

View File

@@ -1526,7 +1526,7 @@ else
endif endif
dep_zlib = dependency('zlib', version : '>= 1.2.3', dep_zlib = dependency('zlib', version : '>= 1.2.3',
fallback : ['zlib', 'zlib_dep'], allow_fallback: true,
required : get_option('zlib')) required : get_option('zlib'))
if dep_zlib.found() if dep_zlib.found()
pre_args += '-DHAVE_ZLIB' pre_args += '-DHAVE_ZLIB'
@@ -1569,7 +1569,7 @@ with_expat = get_option('expat') \
if host_machine.system() == 'darwin' if host_machine.system() == 'darwin'
dep_expat = meson.get_compiler('c').find_library('expat', required : with_expat) dep_expat = meson.get_compiler('c').find_library('expat', required : with_expat)
else else
dep_expat = dependency('expat', fallback : ['expat', 'expat_dep'], dep_expat = dependency('expat', allow_fallback: true,
required : with_expat) required : with_expat)
endif endif

View File

@@ -26,10 +26,10 @@ rnn_install_path = get_option('datadir') + '/freedreno/registers'
rnn_path = rnn_src_path + ':' + get_option('prefix') + '/' + rnn_install_path rnn_path = rnn_src_path + ':' + get_option('prefix') + '/' + rnn_install_path
dep_lua = dependency('lua54', 'lua53', 'lua52', 'lua', required: false, dep_lua = dependency('lua54', 'lua53', 'lua52', 'lua', required: false,
fallback : ['lua', 'lua_dep'], version: '>=5.2') allow_fallback: true, version: '>=5.2')
dep_libarchive = dependency('libarchive', fallback : ['libarchive', 'libarchive_dep'], required: false) dep_libarchive = dependency('libarchive', allow_fallback: true, required: false)
dep_libxml2 = dependency('libxml-2.0', fallback: ['libxml2', 'libxml2_dep'], required: false) dep_libxml2 = dependency('libxml-2.0', allow_fallback: true, required: false)
prog_gzip = find_program('gzip', required: false) prog_gzip = find_program('gzip', required: false)
install_fd_decode_tools = dep_libxml2.found() and prog_gzip.found() and \ install_fd_decode_tools = dep_libxml2.found() and prog_gzip.found() and \