diff options
author | Dylan Baker <dylan.c.baker@intel.com> | 2022-12-20 15:21:11 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-01-19 16:29:03 +0000 |
commit | c40e1bb1d04ed63256ece125b98aa00eec3c09de (patch) | |
tree | b82d830e4060952523bb179b213bb2646fb8e0ec /meson.build | |
parent | 6b334a84167377a4b9dfe4836b13fa66d2850217 (diff) | |
download | mesa-c40e1bb1d04ed63256ece125b98aa00eec3c09de.tar.gz |
meson: use a feature option for gbm
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/meson.build b/meson.build index 2fc6140b793..83df5ba1f48 100644 --- a/meson.build +++ b/meson.build @@ -359,22 +359,10 @@ if not (with_dri or with_gallium or with_glx != 'disabled') with_shared_glapi = false endif -_gbm = get_option('gbm') -if _gbm == 'true' - _gbm = 'enabled' - warning('gbm option "true" deprecated, please use "enabled" instead.') -elif _gbm == 'false' - _gbm = 'disabled' - warning('gbm option "false" deprecated, please use "disabled" instead.') -endif -if _gbm == 'auto' - with_gbm = system_has_kms_drm and with_dri -else - with_gbm = _gbm == 'enabled' -endif -if with_gbm and not system_has_kms_drm - error('GBM only supports DRM/KMS platforms') -endif +with_gbm = get_option('gbm') \ + .require(system_has_kms_drm, error_message : 'GBM only supports DRM/KMS platforms') \ + .disable_auto_if(not with_dri) \ + .allowed() _xlib_lease = get_option('xlib-lease') if _xlib_lease == 'true' |