meson: use a feature option for gles1
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:
@@ -10,14 +10,14 @@ OpenGL ES depends on a working EGL implementation. Please refer to
|
|||||||
Build the Libraries
|
Build the Libraries
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
#. Run ``meson configure`` with ``-D gles1=true -D gles2=true`` and
|
#. Run ``meson configure`` with ``-D gles1=enabled -D gles2=true`` and
|
||||||
enable the Gallium driver for your hardware.
|
enable the Gallium driver for your hardware.
|
||||||
#. Build and install Mesa as usual.
|
#. Build and install Mesa as usual.
|
||||||
|
|
||||||
Alternatively, if XCB-DRI2 is installed on the system, one can use
|
Alternatively, if XCB-DRI2 is installed on the system, one can use
|
||||||
``egl_dri2`` EGL driver with OpenGL|ES-enabled DRI drivers
|
``egl_dri2`` EGL driver with OpenGL|ES-enabled DRI drivers
|
||||||
|
|
||||||
#. Run ``meson configure`` with ``-D gles1=true -D gles2=true``.
|
#. Run ``meson configure`` with ``-D gles1=enabled -D gles2=true``.
|
||||||
#. Build and install Mesa as usual.
|
#. Build and install Mesa as usual.
|
||||||
|
|
||||||
Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or
|
Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or
|
||||||
|
22
meson.build
22
meson.build
@@ -107,14 +107,6 @@ if gbm_backends_path == ''
|
|||||||
gbm_backends_path = join_paths(get_option('prefix'), get_option('libdir'), 'gbm')
|
gbm_backends_path = join_paths(get_option('prefix'), get_option('libdir'), 'gbm')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
with_gles1 = get_option('gles1')
|
|
||||||
if with_gles1 == 'true'
|
|
||||||
with_gles1 = 'enabled'
|
|
||||||
warning('gles1 option "true" deprecated, please use "enabled" instead.')
|
|
||||||
elif with_gles1 == 'false'
|
|
||||||
with_gles1 = 'disabled'
|
|
||||||
warning('gles1 option "false" deprecated, please use "disabled" instead.')
|
|
||||||
endif
|
|
||||||
with_gles2 = get_option('gles2')
|
with_gles2 = get_option('gles2')
|
||||||
if with_gles2 == 'true'
|
if with_gles2 == 'true'
|
||||||
with_gles2 = 'enabled'
|
with_gles2 = 'enabled'
|
||||||
@@ -138,27 +130,27 @@ with_shared_glapi = get_option('shared-glapi') \
|
|||||||
.disable_auto_if(host_machine.system() == 'windows') \
|
.disable_auto_if(host_machine.system() == 'windows') \
|
||||||
.allowed()
|
.allowed()
|
||||||
|
|
||||||
|
with_gles1 = get_option('gles1') \
|
||||||
|
.require(with_shared_glapi, error_message : 'OpengGL ES 1.x requires shared-glapi') \
|
||||||
|
.require(with_opengl, error_message : 'building OpenGL ES 1.x without OpenGL is not supported.') \
|
||||||
|
.allowed()
|
||||||
|
|
||||||
# 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
|
||||||
if ((with_gles1 == 'enabled' and with_gles2 == 'enabled') or
|
if with_gles2 == 'enabled' and not with_opengl
|
||||||
(with_gles1 == 'enabled' and with_opengl) or
|
|
||||||
(with_gles2 == 'enabled' and with_opengl))
|
|
||||||
error('shared-glapi required for building two or more of OpenGL, OpenGL ES 1.x, OpenGL ES 2.x')
|
error('shared-glapi required for building two or more of OpenGL, OpenGL ES 1.x, OpenGL ES 2.x')
|
||||||
endif
|
endif
|
||||||
with_gles1 = 'disabled'
|
|
||||||
with_gles2 = 'disabled'
|
with_gles2 = 'disabled'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# We require OpenGL for OpenGL ES
|
# We require OpenGL for OpenGL ES
|
||||||
if not with_opengl
|
if not with_opengl
|
||||||
if (with_gles1 == 'enabled' or with_gles2 == 'enabled') and not with_opengl
|
if with_gles2 == 'enabled' and not with_opengl
|
||||||
error('building OpenGL ES without OpenGL is not supported.')
|
error('building OpenGL ES without OpenGL is not supported.')
|
||||||
endif
|
endif
|
||||||
with_gles1 = 'disabled'
|
|
||||||
with_gles2 = 'disabled'
|
with_gles2 = 'disabled'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
with_gles1 = with_gles1 != 'disabled'
|
|
||||||
with_gles2 = with_gles2 != 'disabled'
|
with_gles2 = with_gles2 != 'disabled'
|
||||||
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
|
||||||
|
@@ -246,9 +246,7 @@ option(
|
|||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'gles1',
|
'gles1',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
value : 'auto',
|
|
||||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
|
||||||
description : 'Build support for OpenGL ES 1.x'
|
description : 'Build support for OpenGL ES 1.x'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
|
Reference in New Issue
Block a user