summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-07-12 20:11:32 -0500
committerDudemanguy <random342@airmail.cc>2023-07-14 14:24:45 +0000
commit2616b2b11eac26dfbb85926477a652d2a0540ef6 (patch)
tree127ff33a2175caf750bfe7a767a4bceee9222801 /meson.build
parentcf0373e15bbe3da8af7b3d1bbe1ae5caee9672cf (diff)
downloadmpv-2616b2b11eac26dfbb85926477a652d2a0540ef6.tar.bz2
mpv-2616b2b11eac26dfbb85926477a652d2a0540ef6.tar.xz
build: make dmabuf-wayland a build option and require drm
It makes more sense as an option at this point. Also libdrm is not optional at all. You have to get a drm format and modifier for this to even work (the VO will just fail without DRM). Just hard require it and remove the guards. vaapi can remain optional.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build20
1 files changed, 12 insertions, 8 deletions
diff --git a/meson.build b/meson.build
index 19448f44f6..8754a1b5e3 100644
--- a/meson.build
+++ b/meson.build
@@ -1013,6 +1013,18 @@ if features['wayland'] and features['memfd_create']
sources += files('video/out/vo_wlshm.c')
endif
+dmabuf_wayland = get_option('dmabuf-wayland').require(
+ features['drm'] and features['memfd_create'] and features['wayland'],
+ error_message: 'drm, memfd_create, or wayland was not found!',
+)
+features += {'dmabuf-wayland': dmabuf_wayland.allowed()}
+if features['dmabuf-wayland']
+ sources += files('video/out/vo_dmabuf_wayland.c')
+ sources += files('video/out/hwdec/dmabuf_interop_wl.c')
+ sources += files('video/out/wldmabuf/context_wldmabuf.c')
+ sources += files('video/out/wldmabuf/ra_wldmabuf.c')
+endif
+
x11_opt = get_option('x11').require(
get_option('gpl'),
error_message: 'the build is not GPL!',
@@ -1431,14 +1443,6 @@ if features['dmabuf-interop-pl']
sources += files('video/out/hwdec/dmabuf_interop_pl.c')
endif
-features += {'dmabuf-wayland' : features['wayland'] and features['memfd_create'] and (features['vaapi-wayland'] or features['drm'])}
-if features['dmabuf-wayland']
- sources += files('video/out/vo_dmabuf_wayland.c')
- sources += files('video/out/hwdec/dmabuf_interop_wl.c')
- sources += files('video/out/wldmabuf/context_wldmabuf.c')
- sources += files('video/out/wldmabuf/ra_wldmabuf.c')
-endif
-
vdpau_opt = get_option('vdpau').require(
features['x11'],
error_message: 'x11 was not found!',