meson: Make shared-glapi a combo
So it can auto off for windows, but on elsewhere. Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
a1a8703199
commit
8424209a42
11
meson.build
11
meson.build
|
@ -89,7 +89,14 @@ if host_machine.system() == 'windows'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
with_opengl = get_option('opengl')
|
with_opengl = get_option('opengl')
|
||||||
with_shared_glapi = get_option('shared-glapi')
|
|
||||||
|
# Default shared glapi off for windows, on elsewhere.
|
||||||
|
_sg = get_option('shared-glapi')
|
||||||
|
if _sg == 'auto'
|
||||||
|
with_shared_glapi = host_machine.system() != 'windows'
|
||||||
|
else
|
||||||
|
with_shared_glapi = _sg == 'true'
|
||||||
|
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
|
||||||
|
@ -115,7 +122,7 @@ with_gles1 = with_gles1 != 'false'
|
||||||
with_gles2 = with_gles2 != 'false'
|
with_gles2 = with_gles2 != 'false'
|
||||||
with_any_opengl = with_opengl or with_gles1 or with_gles2
|
with_any_opengl = with_opengl or with_gles1 or with_gles2
|
||||||
# Only build shared_glapi if at least one OpenGL API is enabled
|
# Only build shared_glapi if at least one OpenGL API is enabled
|
||||||
with_shared_glapi = get_option('shared-glapi') and with_any_opengl
|
with_shared_glapi = with_shared_glapi and with_any_opengl
|
||||||
|
|
||||||
system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux'].contains(host_machine.system())
|
system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux'].contains(host_machine.system())
|
||||||
|
|
||||||
|
|
|
@ -176,9 +176,10 @@ option(
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'shared-glapi',
|
'shared-glapi',
|
||||||
type : 'boolean',
|
type : 'combo',
|
||||||
value : true,
|
value : 'auto',
|
||||||
description : 'Whether to build a shared or static glapi'
|
choices : ['auto', 'true', 'false'],
|
||||||
|
description : 'Whether to build a shared or static glapi. Defaults to false on Windows, true elsewhere'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'gles1',
|
'gles1',
|
||||||
|
|
Loading…
Reference in New Issue