Path: blob/21.2-virgl/src/mapi/shared-glapi/meson.build
4560 views
# Copyright © 2017 Intel Corporation12# Permission is hereby granted, free of charge, to any person obtaining a copy3# of this software and associated documentation files (the "Software"), to deal4# in the Software without restriction, including without limitation the rights5# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell6# copies of the Software, and to permit persons to whom the Software is7# furnished to do so, subject to the following conditions:89# The above copyright notice and this permission notice shall be included in10# all copies or substantial portions of the Software.1112# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR13# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,14# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE15# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER16# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,17# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE18# SOFTWARE.1920files_mapi_glapi = files(21'../entry.c',22'../mapi_glapi.c',23'../stub.c',24'../stub.h',25'../table.c',26'../table.h',27)2829shared_glapi_mapi_tmp_h = custom_target(30'shared_glapi_mapi_tmp.h',31input : [mapi_abi_py, gl_and_es_api_files],32output : 'glapi_mapi_tmp.h',33command : [prog_python, '@INPUT0@', '--printer', 'shared-glapi', '@INPUT1@'],34depend_files : api_xml_files,35capture : true,36)3738_glapi_c_args = []39if with_platform_windows40_glapi_c_args += ['-D_GLAPI_DLL_EXPORTS']41endif4243libglapi = shared_library(44'glapi',45[files_mapi_glapi, files_mapi_util, shared_glapi_mapi_tmp_h],46c_args : [47_glapi_c_args,48c_msvc_compat_args,49'-DMAPI_MODE_GLAPI',50'-DMAPI_ABI_HEADER="@0@"'.format(shared_glapi_mapi_tmp_h.full_path()),51gcc_lto_quirk,52],53gnu_symbol_visibility : 'hidden',54link_args : [ld_args_gc_sections],55include_directories : [inc_src, inc_include, inc_mapi],56dependencies : [dep_thread, dep_selinux],57soversion : host_machine.system() == 'windows' ? '' : '0',58version : '0.0.0',59name_prefix : 'lib',60install : true,61)6263if with_any_opengl and with_tests64test(65'shared-glapi-test',66executable(67['shared-glapi-test', glapitable_h],68'tests/check_table.cpp',69cpp_args : [cpp_msvc_compat_args],70include_directories : [inc_src, inc_include, inc_mapi],71link_with : [libglapi],72dependencies : [dep_thread, idep_gtest],73),74suite : ['mapi'],75)76if with_symbols_check77test(78'shared-glapi symbols check',79symbols_check,80args : [81'--lib', libglapi,82'--symbols-file', files('glapi-symbols.txt'),83symbols_check_args,84],85suite : ['mapi'],86)87endif88endif899091