Mesa (master): meson: simplify the gbm option code, and avoid changing types
Eric Engeström
eric_engestrom at kemper.freedesktop.org
Tue Feb 27 11:23:55 UTC 2018
Module: Mesa
Branch: master
Commit: 76e8d619996a6179af7506b77edad7a9fe3dbc63
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=76e8d619996a6179af7506b77edad7a9fe3dbc63
Author: Eric Engestrom <eric.engestrom at imgtec.com>
Date: Fri Feb 23 17:08:20 2018 +0000
meson: simplify the gbm option code, and avoid changing types
v2: drop gallium comment (Dylan)
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
---
meson.build | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/meson.build b/meson.build
index 6f2615f9d1..40e9c8ff45 100644
--- a/meson.build
+++ b/meson.build
@@ -294,16 +294,14 @@ if not (with_dri or with_gallium or with_glx == 'xlib' or with_glx == 'gallium-x
with_shared_glapi = false
endif
-with_gbm = get_option('gbm')
-if with_gbm == 'auto' and with_dri # TODO: or gallium
- with_gbm = system_has_kms_drm
-elif with_gbm == 'true'
- if not system_has_kms_drm
- error('GBM only supports DRM/KMS platforms')
- endif
- with_gbm = true
+_gbm = get_option('gbm')
+if _gbm == 'auto'
+ with_gbm = system_has_kms_drm and with_dri
else
- with_gbm = false
+ with_gbm = _gbm == 'true'
+endif
+if with_gbm and not system_has_kms_drm
+ error('GBM only supports DRM/KMS platforms')
endif
_egl = get_option('egl')
More information about the mesa-commit
mailing list