meson: use a feature option for xlib-lease

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>
This commit is contained in:
Dylan Baker 2022-12-20 16:36:46 -08:00 committed by Marge Bot
parent ce490a20e7
commit e3f60ea4a8
2 changed files with 4 additions and 16 deletions

View File

@ -364,19 +364,9 @@ with_gbm = get_option('gbm') \
.disable_auto_if(not with_dri) \
.allowed()
_xlib_lease = get_option('xlib-lease')
if _xlib_lease == 'true'
_xlib_lease = 'enabled'
warning('xlib_lease option "true" deprecated, please use "enabled" instead.')
elif _xlib_lease == 'false'
_xlib_lease = 'disabled'
warning('xlib_lease option "false" deprecated, please use "disabled" instead.')
endif
if _xlib_lease == 'auto'
with_xlib_lease = with_platform_x11 and system_has_kms_drm
else
with_xlib_lease = _xlib_lease == 'enabled'
endif
with_xlib_lease = get_option('xlib-lease') \
.require(with_platform_x11 and system_has_kms_drm, error_message : 'xlib-lease requires X11 and KMS/DRM support') \
.allowed()
if with_platform_wayland
c_args += '-DVK_USE_PLATFORM_WAYLAND_KHR'

View File

@ -412,9 +412,7 @@ option(
)
option(
'xlib-lease',
type : 'combo',
value : 'auto',
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
type : 'feature',
description : 'Enable VK_EXT_acquire_xlib_display.'
)
option(