summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-10-30 17:40:30 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-12-04 14:36:56 -0800
commit0ba909f0f111824223bc38563d1a6bc73e69c2cc (patch)
treee955bbc44285b4acc960fe5e30201a04574ebd51 /meson.build
parent5a785d51a6d68ec676cea6220f75bad95a3221dc (diff)
meson: build gallium xa 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.build22
1 files changed, 22 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index e7a199facc..b80434136b 100644
--- a/meson.build
+++ b/meson.build
@@ -538,6 +538,28 @@ if va_drivers_path == ''
va_drivers_path = join_paths(get_option('libdir'), 'dri')
endif
+_xa = get_option('gallium-xa')
+if _xa == 'auto'
+ if not ['linux', 'bsd'].contains(host_machine.system())
+ with_gallium_xa = false
+ elif not (with_gallium_nouveau or with_gallium_freedreno or with_gallium_i915
+ or with_gallium_svga)
+ with_gallium_xa = false
+ else
+ with_gallium_xa = true
+ endif
+elif _xa == 'true'
+ if not ['linux', 'bsd'].contains(host_machine.system())
+ error('XA state tracker can only be built on unix-like OSes.')
+ elif not (with_gallium_nouveau or with_gallium_freedreno or with_gallium_i915
+ or with_gallium_svga)
+ error('XA state tracker requires at least one of the following gallium drivers: nouveau, freedreno, i915, svga.')
+ endif
+ with_gallium_xa = true
+else
+ with_gallium_xa = false
+endif
+
gl_pkgconfig_c_flags = []
if with_platform_x11
if with_any_vk or (with_glx == 'dri' and with_dri_platform == 'drm')