summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-10-30 14:04:21 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-12-04 14:36:38 -0800
commit68076b87474e7959c161f3dad3672c9322a2c96f (patch)
tree8ff37583edd7242f593cf0a55e0626174a22f7b5 /meson.build
parent085070a2c8c91c14e5a9f46988989faf19b0a125 (diff)
meson: build gallium vdpau state tracker
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build45
1 files changed, 44 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 0f515ad10b8..eeb2adc0ac8 100644
--- a/meson.build
+++ b/meson.build
@@ -361,6 +361,49 @@ if with_dri or with_gallium
endif
endif
+dep_vdpau = []
+_vdpau = get_option('gallium-vdpau')
+if _vdpau == 'auto'
+ if not ['linux', 'bsd'].contains(host_machine.system())
+ with_gallium_vdpau = false
+ elif not with_platform_x11
+ with_gallium_vdpau = false
+ elif not (with_gallium_r300 or with_gallium_r600 or with_gallium_radeonsi or
+ with_gallium_nouveau)
+ with_gallium_vdpau = false
+ else
+ dep_vdpau = dependency('vdpau', version : '>= 1.1', required : false)
+ with_gallium_vdpau = dep_vdpau.found()
+ endif
+elif _vdpau == 'true'
+ if not ['linux', 'bsd'].contains(host_machine.system())
+ error('VDPAU state tracker can only be build on unix-like OSes.')
+ elif not with_platform_x11
+ error('VDPAU state tracker requires X11 support.')
+ with_gallium_vdpau = false
+ elif not (with_gallium_r300 or with_gallium_r600 or with_gallium_radeonsi or
+ with_gallium_nouveau)
+ error('VDPAU state tracker requires at least one of the following gallium drivers: r300, r600, radeonsi, nouveau.')
+ endif
+ dep_vdpau = dependency('vdpau', version : '>= 1.1')
+ with_gallium_vdpau = true
+else
+ with_gallium_vdpau = false
+endif
+if with_gallium_vdpau
+ dep_vdpau = declare_dependency(
+ compile_args : dep_vdpau.get_pkgconfig_variable('cflags').split()
+ )
+endif
+
+if with_gallium_vdpau
+ pre_args += '-DHAVE_ST_VDPAU'
+endif
+vdpau_drivers_path = get_option('vdpau-libs-path')
+if vdpau_drivers_path == ''
+ vdpau_drivers_path = join_paths(get_option('libdir'), 'vdpau')
+endif
+
gl_pkgconfig_c_flags = []
if with_platform_x11
if with_any_vk or (with_glx == 'dri' and with_dri_platform == 'drm')
@@ -890,7 +933,7 @@ if with_platform_x11
dep_xcb_glx = dependency('xcb-glx', version : '>= 1.8.1')
dep_xxf86vm = dependency('xxf86vm', required : false)
endif
- if with_any_vk or with_glx == 'dri'
+ if with_any_vk or with_glx == 'dri' or with_gallium_vdpau
dep_xcb = dependency('xcb')
dep_x11_xcb = dependency('x11-xcb')
endif