2017-09-21 04:11:32 +01:00
|
|
|
# Copyright © 2017 Intel Corporation
|
|
|
|
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
# furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
# all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
# SOFTWARE.
|
|
|
|
|
|
|
|
es2_glapi_mapi_tmp_h = custom_target(
|
|
|
|
'es2_glapi_mapi_tmp.h',
|
2018-11-20 17:30:47 +00:00
|
|
|
input : [glapi_gen_mapi_py, glapi_gen_gl_xml],
|
2017-09-21 04:11:32 +01:00
|
|
|
output : 'glapi_mapi_tmp.h',
|
2018-11-20 17:30:47 +00:00
|
|
|
command : [prog_python, '@INPUT0@', 'glesv2', '@INPUT1@'],
|
|
|
|
depend_files : glapi_gen_mapi_deps,
|
2017-09-21 04:11:32 +01:00
|
|
|
capture : true,
|
|
|
|
)
|
|
|
|
|
2018-04-18 21:22:35 +01:00
|
|
|
_es2_c_args = []
|
|
|
|
if with_platform_windows
|
|
|
|
_es2_c_args += ['-D_GDI32_', '-DBUILD_GL32']
|
|
|
|
endif
|
|
|
|
|
2021-12-03 12:51:58 +00:00
|
|
|
gles2_def = custom_target(
|
|
|
|
'gles2.def',
|
|
|
|
input: 'gles2.def.in',
|
|
|
|
output : 'gles2.def',
|
|
|
|
command : [prog_python, gen_vs_module_defs_py,
|
|
|
|
'--in_file', '@INPUT@', '--out_file', '@OUTPUT@',
|
|
|
|
'--compiler_id', cc.get_id(), '--cpu_family', host_machine.cpu_family()]
|
|
|
|
)
|
|
|
|
|
2017-09-21 04:11:32 +01:00
|
|
|
libgles2 = shared_library(
|
2018-06-13 23:17:32 +01:00
|
|
|
'GLESv2' + get_option('gles-lib-suffix'),
|
2017-09-21 04:11:32 +01:00
|
|
|
['../entry.c', es2_glapi_mapi_tmp_h],
|
2021-12-03 12:51:58 +00:00
|
|
|
vs_module_defs : gles2_def,
|
2017-12-11 23:56:08 +00:00
|
|
|
c_args : [
|
2018-04-18 21:22:35 +01:00
|
|
|
c_msvc_compat_args,
|
|
|
|
_es2_c_args,
|
|
|
|
'-DMAPI_MODE_BRIDGE',
|
2017-12-11 23:56:08 +00:00
|
|
|
'-DMAPI_ABI_HEADER="@0@"'.format(es2_glapi_mapi_tmp_h.full_path()),
|
2019-02-03 18:36:32 +00:00
|
|
|
gcc_lto_quirk,
|
2017-12-11 23:56:08 +00:00
|
|
|
],
|
2020-04-24 21:10:41 +01:00
|
|
|
gnu_symbol_visibility : 'hidden',
|
2017-09-21 04:11:32 +01:00
|
|
|
link_args : [ld_args_gc_sections],
|
|
|
|
include_directories : [inc_src, inc_include, inc_mapi],
|
|
|
|
link_with : libglapi,
|
|
|
|
dependencies : [dep_thread, dep_libdrm, dep_m, dep_dl],
|
2018-07-10 19:09:27 +01:00
|
|
|
soversion : host_machine.system() == 'windows' ? '' : '2',
|
2017-11-02 23:24:00 +00:00
|
|
|
version : '2.0.0',
|
2021-01-30 21:10:12 +00:00
|
|
|
darwin_versions : '3.0.0',
|
2018-07-10 19:09:27 +01:00
|
|
|
name_prefix : 'lib',
|
2017-09-21 04:11:32 +01:00
|
|
|
install : true,
|
|
|
|
)
|
|
|
|
|
|
|
|
pkg.generate(
|
|
|
|
name : 'glesv2',
|
|
|
|
filebase : 'glesv2',
|
|
|
|
description : 'Mesa OpenGL ES 2.0 library',
|
|
|
|
version : meson.project_version(),
|
|
|
|
libraries : libgles2,
|
2018-02-16 22:56:31 +00:00
|
|
|
libraries_private : gl_priv_libs,
|
2017-09-21 04:11:32 +01:00
|
|
|
)
|
|
|
|
|
2019-10-29 14:21:08 +00:00
|
|
|
if with_symbols_check
|
2017-12-12 00:13:31 +00:00
|
|
|
test(
|
|
|
|
'es2-ABI-check',
|
2018-10-11 14:46:34 +01:00
|
|
|
symbols_check,
|
|
|
|
args : [
|
|
|
|
'--lib', libgles2,
|
|
|
|
'--symbols-file', files('gles2-symbols.txt'),
|
2019-10-29 21:32:05 +00:00
|
|
|
symbols_check_args,
|
2018-10-11 14:46:34 +01:00
|
|
|
],
|
2018-11-19 21:44:15 +00:00
|
|
|
suite : ['mapi'],
|
2017-10-30 15:46:15 +00:00
|
|
|
)
|
2017-09-21 04:11:32 +01:00
|
|
|
endif
|