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:
16
meson.build
16
meson.build
@@ -134,19 +134,9 @@ endif
|
|||||||
with_opengl = get_option('opengl')
|
with_opengl = get_option('opengl')
|
||||||
|
|
||||||
# Default shared glapi off for windows, on elsewhere.
|
# Default shared glapi off for windows, on elsewhere.
|
||||||
_sg = get_option('shared-glapi')
|
with_shared_glapi = get_option('shared-glapi') \
|
||||||
if _sg == 'true'
|
.disable_auto_if(host_machine.system() == 'windows') \
|
||||||
_sg = 'enabled'
|
.allowed()
|
||||||
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
|
|
||||||
|
|
||||||
# shared-glapi is required if at least two OpenGL APIs are being built
|
# shared-glapi is required if at least two OpenGL APIs are being built
|
||||||
if not with_shared_glapi
|
if not with_shared_glapi
|
||||||
|
@@ -241,9 +241,7 @@ option(
|
|||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'shared-glapi',
|
'shared-glapi',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
value : 'auto',
|
|
||||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
|
||||||
description : 'Whether to build a shared or static glapi. Defaults to false on Windows, true elsewhere'
|
description : 'Whether to build a shared or static glapi. Defaults to false on Windows, true elsewhere'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
|
Reference in New Issue
Block a user