summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-06-18 20:51:31 -0500
committerDudemanguy <random342@airmail.cc>2022-06-19 02:24:31 +0000
commit44ecf83a1bd94f69cbe7e55b900f2502d15d7d5c (patch)
tree1c9cfb530187e5ed7b8444e07407597a685328b2
parent07d78f8c8b4997c9331d376737d8107a89e91bdd (diff)
downloadmpv-44ecf83a1bd94f69cbe7e55b900f2502d15d7d5c.tar.bz2
mpv-44ecf83a1bd94f69cbe7e55b900f2502d15d7d5c.tar.xz
meson: use require when checking for vdpau
Technically this was wrong. If you passed -Dvdpau=enabled but did not have x11 (a requirement for this), the build would silently just not build the vdpau VO. The correct behavior is for it to be a hard error. Accomplish this by using the require function and making sure that x11 is indeed being used before attempting to find the library.
-rw-r--r--meson.build8
1 files changed, 6 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index a33ff141cb..5524828f88 100644
--- a/meson.build
+++ b/meson.build
@@ -1494,8 +1494,12 @@ if vaapi_egl['use'] or vaapi_libplacebo['use']
sources += files('video/out/hwdec/hwdec_vaapi.c')
endif
-vdpau = dependency('vdpau', version: '>= 0.2', required: get_option('vdpau'))
-if vdpau.found() and x11['use']
+vdpau_opt = get_option('vdpau').require(
+ x11['use'],
+ error_message: 'x11 was not found!',
+)
+vdpau = dependency('vdpau', version: '>= 0.2', required: vdpau_opt)
+if vdpau.found()
dependencies += vdpau
features += 'vdpau'
sources += files('video/filter/vf_vdpaupp.c',