Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/glx/meson.build
4558 views
1
# Copyright © 2017-2019 Intel Corporation
2
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:
9
10
# The above copyright notice and this permission notice shall be included in
11
# all copies or substantial portions of the Software.
12
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
19
# SOFTWARE.
20
21
inc_glx = include_directories('.')
22
23
subdir('apple')
24
if with_dri_platform == 'windows'
25
subdir('windows')
26
endif
27
28
files_libglx = files(
29
'clientattrib.c',
30
'clientinfo.c',
31
'compsize.c',
32
'create_context.c',
33
'dri_common.c',
34
'dri_common.h',
35
'dri_common_query_renderer.c',
36
'dri_common_interop.c',
37
'drisw_glx.c',
38
'drisw_priv.h',
39
'eval.c',
40
'glxclient.h',
41
'glxcmds.c',
42
'glxconfig.c',
43
'glxconfig.h',
44
'glxcurrent.c',
45
'glx_error.c',
46
'glx_error.h',
47
'glxext.c',
48
'glxextensions.c',
49
'glxextensions.h',
50
'glxhash.c',
51
'glxhash.h',
52
'glx_pbuffer.c',
53
'glx_query.c',
54
'indirect_glx.c',
55
'indirect_init.h',
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',
63
'packrender.h',
64
'packsingle.h',
65
'pixel.c',
66
'pixelstore.c',
67
'query_renderer.c',
68
'render2.c',
69
'renderpix.c',
70
'single2.c',
71
'singlepix.c',
72
'vertarr.c',
73
'xfont.c',
74
)
75
76
if with_platform_android or host_machine.system() == 'darwin'
77
dep_xdamage = null_dep
78
endif
79
80
extra_libs_libglx = []
81
extra_deps_libgl = []
82
extra_ld_args_libgl = []
83
84
# dri2
85
if with_dri_platform == 'drm' and dep_libdrm.found()
86
files_libglx += files(
87
'dri2.c',
88
'dri2_glx.c',
89
'dri2.h',
90
'dri2_priv.h',
91
)
92
endif
93
94
if with_dri3
95
files_libglx += files('dri3_glx.c', 'dri3_priv.h')
96
endif
97
98
if with_dri_platform == 'apple'
99
files_libglx += files('applegl_glx.c')
100
extra_libs_libglx += libappleglx
101
elif with_dri_platform == 'windows'
102
files_libglx += files('driwindows_glx.c')
103
extra_libs_libglx += [
104
libwindowsdri,
105
libwindowsglx,
106
]
107
extra_deps_libgl = [
108
meson.get_compiler('c').find_library('gdi32'),
109
meson.get_compiler('c').find_library('opengl32')
110
]
111
extra_ld_args_libgl = '-Wl,--disable-stdcall-fixup'
112
endif
113
114
if not with_glvnd
115
gl_lib_name = 'GL'
116
gl_lib_version = '1.2.0'
117
else
118
gl_lib_name = 'GLX_@0@'.format(glvnd_vendor_name)
119
gl_lib_version = '0.0.0'
120
files_libglx += files(
121
'g_glxglvnddispatchfuncs.c',
122
'g_glxglvnddispatchindices.h',
123
'glxglvnd.c',
124
'glxglvnd.h',
125
'glxglvnddispatchfuncs.h',
126
)
127
endif
128
129
libglx = static_library(
130
'glx',
131
not with_platform_android and host_machine.system() != 'darwin' ? [files_libglx, glx_generated] : files('empty.c'),
132
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glapi, inc_loader],
133
c_args : [
134
'-DGL_LIB_NAME="lib@[email protected].@1@"'.format(gl_lib_name, gl_lib_version.split('.')[0]),
135
],
136
gnu_symbol_visibility : 'hidden',
137
link_with : [
138
libloader, libloader_dri3_helper,
139
extra_libs_libglx,
140
],
141
dependencies : [
142
idep_mesautil, idep_xmlconfig,
143
dep_libdrm, dep_dri2proto, dep_glproto, dep_x11, dep_glvnd,
144
],
145
)
146
147
libgl = shared_library(
148
gl_lib_name,
149
[],
150
link_with : [libglapi],
151
link_whole : [
152
libglx, libglapi_static, libdricommon, libmegadriver_stub,
153
],
154
link_args : [ld_args_bsymbolic, ld_args_gc_sections, extra_ld_args_libgl],
155
dependencies : [
156
dep_libdrm, dep_dl, dep_m, dep_thread, dep_x11, dep_xcb_glx, dep_xcb,
157
dep_x11_xcb, dep_xcb_dri2, dep_xext, dep_xfixes, dep_xdamage, dep_xxf86vm,
158
dep_xcb_shm, extra_deps_libgl,
159
],
160
version : gl_lib_version,
161
darwin_versions : '4.0.0',
162
install : true,
163
)
164
165
if with_tests
166
subdir('tests')
167
endif
168
169