meson: Allow building glvnd with EGL and non-dri based GLX
authorDylan Baker <dylan@pnwbakers.com>
Wed, 1 Nov 2017 17:24:10 +0000 (10:24 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 8 Nov 2017 15:53:00 +0000 (15:53 +0000)
Because meson mirrors the auototools logic, it needs the same changes to
allow building glvnd based egl.

v2: - change if to elif (Eric)

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
meson.build

index 44e062e01e9fd00d9a31da49b4b07bd47db9de06..cd7065102261cf8a779ea91de8d71c26e45d5d40 100644 (file)
@@ -231,8 +231,12 @@ if with_glx != 'disabled'
 endif
 
 with_glvnd = get_option('glvnd')
-if with_glvnd and with_glx != 'dri'
-  message('glvnd requires dri based glx')
+if with_glvnd
+  if with_glx == 'xlib' or with_glx == 'gallium-xlib'
+    error('Cannot build glvnd support for GLX that is not DRI based.')
+  elif with_glx == 'disabled' and not with_egl
+    error('glvnd requires DRI based GLX and/or EGL')
+  endif
 endif
 
 # TODO: toggle for this