1 # Copyright © 2017-2019 Intel Corporation
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 inc_glx = include_directories('.')
24 if with_dri_platform == 'windows'
35 'dri_common_query_renderer.c',
36 'dri_common_interop.c',
56 'indirect_texture_compression.c',
57 'indirect_transpose_matrix.c',
58 'indirect_vertex_array.c',
59 'indirect_vertex_array.h',
60 'indirect_vertex_array_priv.h',
61 'indirect_vertex_program.c',
62 'indirect_window_pos.c',
76 extra_libs_libglx = []
78 extra_ld_args_libgl = []
81 if with_dri_platform == 'drm' and dep_libdrm.found()
82 files_libglx += files(
96 files_libglx += files('dri3_glx.c', 'dri3_priv.h')
99 if with_dri_platform == 'apple'
100 files_libglx += files('applegl_glx.c')
101 extra_libs_libglx += libappleglx
102 elif with_dri_platform == 'windows'
103 files_libglx += files('driwindows_glx.c')
104 extra_libs_libglx += [
109 meson.get_compiler('c').find_library('gdi32'),
110 meson.get_compiler('c').find_library('opengl32')
112 extra_ld_args_libgl = '-Wl,--disable-stdcall-fixup'
117 gl_lib_version = '1.2.0'
119 gl_lib_name = 'GLX_mesa'
120 gl_lib_version = '0.0.0'
121 files_libglx += files(
122 'g_glxglvnddispatchfuncs.c',
123 'g_glxglvnddispatchindices.h',
126 'glxglvnddispatchfuncs.h',
134 libglx = static_library(
136 [files_libglx, glx_generated],
137 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glapi, inc_loader],
139 c_vis_args, gl_lib_cargs,
140 '-DGL_LIB_NAME="lib@0@.so.@1@"'.format(gl_lib_name, gl_lib_version.split('.')[0]),
143 libloader, libloader_dri3_helper,
147 idep_mesautil, idep_xmlconfig,
148 dep_libdrm, dep_dri2proto, dep_glproto, dep_x11, dep_glvnd,
152 libgl = shared_library(
155 link_with : [libglapi_static, libglapi],
157 link_args : [ld_args_bsymbolic, ld_args_gc_sections, extra_ld_args_libgl],
159 dep_libdrm, dep_dl, dep_m, dep_thread, dep_x11, dep_xcb_glx, dep_xcb,
160 dep_x11_xcb, dep_xcb_dri2, dep_xext, dep_xfixes, dep_xdamage, dep_xxf86vm,
163 version : gl_lib_version,