mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/998>
This commit is contained in:
parent
58d4a5b449
commit
a769e3308d
1 changed files with 4 additions and 3 deletions
|
@ -154,14 +154,15 @@ else
|
||||||
libdrm_dep = dependency('libdrm', required: get_option('msdk'))
|
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 = 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()
|
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 == ''
|
if driverdir == ''
|
||||||
driverdir = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
|
driverdir = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
|
||||||
endif
|
endif
|
||||||
cdata.set_quoted('VA_DRIVERS_PATH', '@0@'.format(driverdir))
|
cdata.set_quoted('VA_DRIVERS_PATH', '@0@'.format(driverdir))
|
||||||
endif
|
|
||||||
|
|
||||||
if msdk_deps_found
|
|
||||||
gstmsdktag = library('gstmsdk',
|
gstmsdktag = library('gstmsdk',
|
||||||
msdk_sources,
|
msdk_sources,
|
||||||
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
|
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
|
||||||
|
|
Loading…
Reference in a new issue