From a769e3308dcb4777b608a6da58eb40dd2c0e0248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 30 Sep 2021 17:43:09 +0200 Subject: [PATCH] msdk: meson: Don't get dependency variable before it's valid. It's possible to have installed MediaSDK environment package (libmfx-dev in Debian) without libva environment package. This setup will lead to a breakage of meson configuration. The fix is to get the libva's driver directory variable after the dependency is validated as found. Part-of: --- subprojects/gst-plugins-bad/sys/msdk/meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/msdk/meson.build b/subprojects/gst-plugins-bad/sys/msdk/meson.build index a77160049e..ac2dd811cd 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/meson.build +++ b/subprojects/gst-plugins-bad/sys/msdk/meson.build @@ -154,14 +154,15 @@ else libdrm_dep = dependency('libdrm', required: get_option('msdk')) msdk_deps = declare_dependency(dependencies: [libva_dep, libva_drm_dep, libdl_dep, libgudev_dep, libdrm_dep]) msdk_deps_found = libva_dep.found() and libva_drm_dep.found() and libdl_dep.found() and libgudev_dep.found() and libdrm_dep.found() - driverdir = libva_dep.get_pkgconfig_variable('driverdir') +endif + +if msdk_deps_found + driverdir = libva_dep.get_variable(pkgconfig: 'driverdir', internal: 'driverdir', default_value: '') if driverdir == '' driverdir = join_paths(get_option('prefix'), get_option('libdir'), 'dri') endif cdata.set_quoted('VA_DRIVERS_PATH', '@0@'.format(driverdir)) -endif -if msdk_deps_found gstmsdktag = library('gstmsdk', msdk_sources, c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],