mirror of https://gitlab.freedesktop.org/mesa/mesa
meson: use a feature option for shared-glapi
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:
parent
98bd7cdb8c
commit
80eb78d7a4
16
meson.build
16
meson.build
|
@ -134,19 +134,9 @@ endif
|
|||
with_opengl = get_option('opengl')
|
||||
|
||||
# Default shared glapi off for windows, on elsewhere.
|
||||
_sg = get_option('shared-glapi')
|
||||
if _sg == 'true'
|
||||
_sg = 'enabled'
|
||||
warning('shared-glapi option "true" deprecated, please use "enabled" instead.')
|
||||
elif _sg == 'false'
|
||||
_sg = 'disabled'
|
||||
warning('shared-glapi option "false" deprecated, please use "disabled" instead.')
|
||||
endif
|
||||
if _sg == 'auto'
|
||||
with_shared_glapi = host_machine.system() != 'windows'
|
||||
else
|
||||
with_shared_glapi = _sg == 'enabled'
|
||||
endif
|
||||
with_shared_glapi = get_option('shared-glapi') \
|
||||
.disable_auto_if(host_machine.system() == 'windows') \
|
||||
.allowed()
|
||||
|
||||
# shared-glapi is required if at least two OpenGL APIs are being built
|
||||
if not with_shared_glapi
|
||||
|
|
|
@ -241,9 +241,7 @@ option(
|
|||
)
|
||||
option(
|
||||
'shared-glapi',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
||||
type : 'feature',
|
||||
description : 'Whether to build a shared or static glapi. Defaults to false on Windows, true elsewhere'
|
||||
)
|
||||
option(
|
||||
|
|
Loading…
Reference in New Issue