meson: Don't allow glx to be built without platform_x11
authorDylan Baker <dylan@pnwbakers.com>
Wed, 18 Oct 2017 22:47:11 +0000 (15:47 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Fri, 20 Oct 2017 23:46:48 +0000 (16:46 -0700)
Previously this failed to change with_glx to disabled from auto if
platform_x11 was unset or if no opengl apis were being built.

v2: - swap conditional positions

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-and-Tested-by: Eric Engestrom <eric@engestrom.ch>
meson.build

index 6b11a5d3103ee4bdaebe426c1f83a14a2245b344..a8bcaf7621bd3a28cefd04cfc6d7bc28a5350c44 100644 (file)
@@ -157,8 +157,12 @@ endif
 pre_args += '-DGLX_USE_TLS'
 with_glx = get_option('glx')
 if with_glx != 'disabled'
-  if not (with_platform_x11 and with_any_opengl) and with_glx != 'auto'
-    error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
+  if not (with_platform_x11 and with_any_opengl)
+    if with_glx == 'auto'
+      with_glx = 'disabled'
+    else
+      error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
+    endif
   elif with_glx == 'gallium-xlib' 
     if not with_gallium
       error('Gallium-xlib based GLX requires at least one gallium driver')