va: meson: Update and enhance meson syntax usage.

This patch contains two updates:

1. Instead of checking for dependency already checked just to verify a
   version, we use the dependency version API.
2. Update the deprecated function get_pkgconfig_variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/997>
This commit is contained in:
Víctor Manuel Jáquez Leal 2021-09-30 17:38:33 +02:00 committed by GStreamer Marge Bot
parent a769e3308d
commit 5e08ede8f6

View file

@ -33,16 +33,13 @@ if not gstva_dep.found()
subdir_done()
endif
# Keep av1 support optional as long as required libva version in gst-libs/va is < 1.8
libva_av1_req = ['>= 1.8']
libva_av1_dep = dependency('libva', version: libva_av1_req, required: false)
if libva_av1_dep.found()
if libva_dep.version().version_compare('>= 1.8')
va_sources += 'gstvaav1dec.c'
endif
cdata.set10('HAVE_LIBDRM', libdrm_dep.found())
driverdir = libva_dep.get_pkgconfig_variable('driverdir')
driverdir = libva_dep.get_variable(pkgconfig: 'driverdir', internal: 'driverdir', default_value: '')
if driverdir == ''
driverdir = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
endif