1bf215546Sopenharmony_ci# Copyright © 2017 Dylan Baker
2bf215546Sopenharmony_ci# Copyright © 2017-2018 Intel Corporation
3bf215546Sopenharmony_ci
4bf215546Sopenharmony_ci# Permission is hereby granted, free of charge, to any person obtaining a copy
5bf215546Sopenharmony_ci# of this software and associated documentation files (the "Software"), to deal
6bf215546Sopenharmony_ci# in the Software without restriction, including without limitation the rights
7bf215546Sopenharmony_ci# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8bf215546Sopenharmony_ci# copies of the Software, and to permit persons to whom the Software is
9bf215546Sopenharmony_ci# furnished to do so, subject to the following conditions:
10bf215546Sopenharmony_ci
11bf215546Sopenharmony_ci# The above copyright notice and this permission notice shall be included in
12bf215546Sopenharmony_ci# all copies or substantial portions of the Software.
13bf215546Sopenharmony_ci
14bf215546Sopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15bf215546Sopenharmony_ci# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16bf215546Sopenharmony_ci# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17bf215546Sopenharmony_ci# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18bf215546Sopenharmony_ci# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19bf215546Sopenharmony_ci# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20bf215546Sopenharmony_ci# SOFTWARE.
21bf215546Sopenharmony_ci
22bf215546Sopenharmony_ciinc_gallium_drivers = include_directories('drivers')
23bf215546Sopenharmony_ciinc_gallium_winsys = include_directories('winsys')
24bf215546Sopenharmony_ciinc_gallium_winsys_sw = include_directories('winsys/sw')
25bf215546Sopenharmony_ci
26bf215546Sopenharmony_cisubdir('auxiliary')
27bf215546Sopenharmony_cisubdir('auxiliary/pipe-loader')
28bf215546Sopenharmony_cisubdir('winsys/sw/null')
29bf215546Sopenharmony_ciif with_dri
30bf215546Sopenharmony_ci  subdir('winsys/sw/dri')
31bf215546Sopenharmony_cielse
32bf215546Sopenharmony_ci  libswdri = []
33bf215546Sopenharmony_ciendif
34bf215546Sopenharmony_ciif with_gallium_drisw_kms
35bf215546Sopenharmony_ci  subdir('winsys/sw/kms-dri')
36bf215546Sopenharmony_cielse
37bf215546Sopenharmony_ci  libswkmsdri = []
38bf215546Sopenharmony_ciendif
39bf215546Sopenharmony_ciif with_platform_windows
40bf215546Sopenharmony_ci  subdir('winsys/sw/gdi')
41bf215546Sopenharmony_cielse
42bf215546Sopenharmony_ci  libwsgdi = null_dep
43bf215546Sopenharmony_ciendif
44bf215546Sopenharmony_cisubdir('winsys/sw/wrapper')
45bf215546Sopenharmony_ciif with_platform_haiku
46bf215546Sopenharmony_ci  subdir('winsys/sw/hgl')
47bf215546Sopenharmony_ciendif
48bf215546Sopenharmony_ciif with_gallium_softpipe
49bf215546Sopenharmony_ci  subdir('drivers/softpipe')
50bf215546Sopenharmony_ci  if draw_with_llvm
51bf215546Sopenharmony_ci    subdir('drivers/llvmpipe')
52bf215546Sopenharmony_ci  endif
53bf215546Sopenharmony_cielse
54bf215546Sopenharmony_ci  driver_swrast = declare_dependency()
55bf215546Sopenharmony_ciendif
56bf215546Sopenharmony_ciif with_gallium_asahi
57bf215546Sopenharmony_ci  subdir('drivers/asahi')
58bf215546Sopenharmony_cielse
59bf215546Sopenharmony_ci  driver_asahi = declare_dependency()
60bf215546Sopenharmony_ciendif
61bf215546Sopenharmony_ciif with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600
62bf215546Sopenharmony_ci  subdir('winsys/radeon/drm')
63bf215546Sopenharmony_ciendif
64bf215546Sopenharmony_ciif with_gallium_r300
65bf215546Sopenharmony_ci  subdir('drivers/r300')
66bf215546Sopenharmony_cielse
67bf215546Sopenharmony_ci  driver_r300 = declare_dependency()
68bf215546Sopenharmony_ciendif
69bf215546Sopenharmony_ciif with_gallium_r600
70bf215546Sopenharmony_ci  subdir('drivers/r600')
71bf215546Sopenharmony_cielse
72bf215546Sopenharmony_ci  driver_r600 = declare_dependency()
73bf215546Sopenharmony_ciendif
74bf215546Sopenharmony_ciif with_gallium_radeonsi
75bf215546Sopenharmony_ci  subdir('winsys/amdgpu/drm')
76bf215546Sopenharmony_ci  subdir('drivers/radeonsi')
77bf215546Sopenharmony_cielse
78bf215546Sopenharmony_ci  driver_radeonsi = declare_dependency()
79bf215546Sopenharmony_ciendif
80bf215546Sopenharmony_ciif with_gallium_nouveau
81bf215546Sopenharmony_ci  subdir('winsys/nouveau/drm')
82bf215546Sopenharmony_ci  subdir('drivers/nouveau')
83bf215546Sopenharmony_cielse
84bf215546Sopenharmony_ci  driver_nouveau = declare_dependency()
85bf215546Sopenharmony_ciendif
86bf215546Sopenharmony_ciif with_gallium_freedreno
87bf215546Sopenharmony_ci  subdir('winsys/freedreno/drm')
88bf215546Sopenharmony_ci  subdir('drivers/freedreno')
89bf215546Sopenharmony_cielse
90bf215546Sopenharmony_ci  driver_freedreno = declare_dependency()
91bf215546Sopenharmony_ciendif
92bf215546Sopenharmony_ciif with_gallium_vc4
93bf215546Sopenharmony_ci  subdir('winsys/vc4/drm')
94bf215546Sopenharmony_ci  subdir('drivers/vc4')
95bf215546Sopenharmony_cielse
96bf215546Sopenharmony_ci  driver_vc4 = declare_dependency()
97bf215546Sopenharmony_ciendif
98bf215546Sopenharmony_ciif with_gallium_panfrost
99bf215546Sopenharmony_ci  subdir('winsys/panfrost/drm')
100bf215546Sopenharmony_ci  subdir('drivers/panfrost')
101bf215546Sopenharmony_cielse
102bf215546Sopenharmony_ci  driver_panfrost = declare_dependency()
103bf215546Sopenharmony_ciendif
104bf215546Sopenharmony_ciif with_gallium_etnaviv
105bf215546Sopenharmony_ci  subdir('winsys/etnaviv/drm')
106bf215546Sopenharmony_ci  subdir('drivers/etnaviv')
107bf215546Sopenharmony_cielse
108bf215546Sopenharmony_ci  driver_etnaviv = declare_dependency()
109bf215546Sopenharmony_ciendif
110bf215546Sopenharmony_ciif with_gallium_kmsro
111bf215546Sopenharmony_ci  subdir('winsys/kmsro/drm')
112bf215546Sopenharmony_cielse
113bf215546Sopenharmony_ci  driver_kmsro = declare_dependency()
114bf215546Sopenharmony_ciendif
115bf215546Sopenharmony_ciif with_gallium_v3d
116bf215546Sopenharmony_ci  subdir('winsys/v3d/drm')
117bf215546Sopenharmony_ci  subdir('drivers/v3d')
118bf215546Sopenharmony_cielse
119bf215546Sopenharmony_ci  driver_v3d = declare_dependency()
120bf215546Sopenharmony_ciendif
121bf215546Sopenharmony_ciif with_gallium_tegra
122bf215546Sopenharmony_ci  subdir('winsys/tegra/drm')
123bf215546Sopenharmony_ci  subdir('drivers/tegra')
124bf215546Sopenharmony_cielse
125bf215546Sopenharmony_ci  driver_tegra = declare_dependency()
126bf215546Sopenharmony_ciendif
127bf215546Sopenharmony_ciif with_gallium_crocus
128bf215546Sopenharmony_ci  subdir('winsys/crocus/drm')
129bf215546Sopenharmony_ci  subdir('drivers/crocus')
130bf215546Sopenharmony_cielse
131bf215546Sopenharmony_ci  driver_crocus = declare_dependency()
132bf215546Sopenharmony_ciendif
133bf215546Sopenharmony_ciif with_gallium_iris
134bf215546Sopenharmony_ci  subdir('winsys/iris/drm')
135bf215546Sopenharmony_ci  subdir('drivers/iris')
136bf215546Sopenharmony_cielse
137bf215546Sopenharmony_ci  driver_iris = declare_dependency()
138bf215546Sopenharmony_ciendif
139bf215546Sopenharmony_ciif with_gallium_i915
140bf215546Sopenharmony_ci  subdir('winsys/i915/drm')
141bf215546Sopenharmony_ci  subdir('drivers/i915')
142bf215546Sopenharmony_cielse
143bf215546Sopenharmony_ci  driver_i915 = declare_dependency()
144bf215546Sopenharmony_ciendif
145bf215546Sopenharmony_ciif with_gallium_svga
146bf215546Sopenharmony_ci  if not with_platform_windows
147bf215546Sopenharmony_ci     subdir('winsys/svga/drm')
148bf215546Sopenharmony_ci  endif
149bf215546Sopenharmony_ci  subdir('drivers/svga')
150bf215546Sopenharmony_cielse
151bf215546Sopenharmony_ci  driver_svga = declare_dependency()
152bf215546Sopenharmony_ciendif
153bf215546Sopenharmony_ciif with_gallium_virgl
154bf215546Sopenharmony_ci  subdir('winsys/virgl/common')
155bf215546Sopenharmony_ci  subdir('winsys/virgl/drm')
156bf215546Sopenharmony_ci  subdir('winsys/virgl/vtest')
157bf215546Sopenharmony_ci  subdir('drivers/virgl')
158bf215546Sopenharmony_cielse
159bf215546Sopenharmony_ci  driver_virgl = declare_dependency()
160bf215546Sopenharmony_ciendif
161bf215546Sopenharmony_ciif with_gallium_lima
162bf215546Sopenharmony_ci  subdir('winsys/lima/drm')
163bf215546Sopenharmony_ci  subdir('drivers/lima')
164bf215546Sopenharmony_cielse
165bf215546Sopenharmony_ci  driver_lima = declare_dependency()
166bf215546Sopenharmony_ciendif
167bf215546Sopenharmony_ciif with_gallium_zink
168bf215546Sopenharmony_ci  subdir('drivers/zink')
169bf215546Sopenharmony_cielse
170bf215546Sopenharmony_ci  driver_zink = declare_dependency()
171bf215546Sopenharmony_ciendif
172bf215546Sopenharmony_ciif with_gallium_d3d12
173bf215546Sopenharmony_ci  subdir('drivers/d3d12')
174bf215546Sopenharmony_cielse
175bf215546Sopenharmony_ci  driver_d3d12 = declare_dependency()
176bf215546Sopenharmony_ciendif
177bf215546Sopenharmony_ciif with_gallium_opencl
178bf215546Sopenharmony_ci  # TODO: this isn't really clover specific, but ATM clover is the only
179bf215546Sopenharmony_ci  # consumer
180bf215546Sopenharmony_ci  subdir('targets/pipe-loader')
181bf215546Sopenharmony_ci
182bf215546Sopenharmony_ci  subdir('frontends/clover')
183bf215546Sopenharmony_ci  subdir('targets/opencl')
184bf215546Sopenharmony_ciendif
185bf215546Sopenharmony_ciif with_dri
186bf215546Sopenharmony_ci  subdir('frontends/dri')
187bf215546Sopenharmony_ci  subdir('targets/dri')
188bf215546Sopenharmony_ciendif
189bf215546Sopenharmony_ciif with_osmesa
190bf215546Sopenharmony_ci  subdir('frontends/osmesa')
191bf215546Sopenharmony_ci  subdir('targets/osmesa')
192bf215546Sopenharmony_ciendif
193bf215546Sopenharmony_ciif with_glx == 'xlib'
194bf215546Sopenharmony_ci  subdir('winsys/sw/xlib')
195bf215546Sopenharmony_ci  subdir('frontends/glx/xlib')
196bf215546Sopenharmony_ci  subdir('targets/libgl-xlib')
197bf215546Sopenharmony_ciendif
198bf215546Sopenharmony_ciif with_gallium_vdpau
199bf215546Sopenharmony_ci  subdir('frontends/vdpau')
200bf215546Sopenharmony_ci  subdir('targets/vdpau')
201bf215546Sopenharmony_ciendif
202bf215546Sopenharmony_ciif with_gallium_xvmc
203bf215546Sopenharmony_ci  subdir('frontends/xvmc')
204bf215546Sopenharmony_ci  subdir('targets/xvmc')
205bf215546Sopenharmony_ciendif
206bf215546Sopenharmony_ciif with_gallium_omx != 'disabled'
207bf215546Sopenharmony_ci  subdir('frontends/omx')
208bf215546Sopenharmony_ci  subdir('targets/omx')
209bf215546Sopenharmony_ciendif
210bf215546Sopenharmony_ciif with_gallium_va
211bf215546Sopenharmony_ci  subdir('frontends/va')
212bf215546Sopenharmony_ci  subdir('targets/va')
213bf215546Sopenharmony_ciendif
214bf215546Sopenharmony_ciif with_gallium_xa
215bf215546Sopenharmony_ci  subdir('frontends/xa')
216bf215546Sopenharmony_ci  subdir('targets/xa')
217bf215546Sopenharmony_ciendif
218bf215546Sopenharmony_ciif with_platform_haiku
219bf215546Sopenharmony_ci  subdir('frontends/hgl')
220bf215546Sopenharmony_ci  subdir('targets/haiku-softpipe')
221bf215546Sopenharmony_ciendif
222bf215546Sopenharmony_ciif with_gallium_st_nine
223bf215546Sopenharmony_ci  subdir('frontends/nine')
224bf215546Sopenharmony_ci  subdir('targets/d3dadapter9')
225bf215546Sopenharmony_ciendif
226bf215546Sopenharmony_ciif with_gallium_st_d3d10umd
227bf215546Sopenharmony_ci  subdir('frontends/d3d10umd')
228bf215546Sopenharmony_ci  subdir('targets/d3d10sw')
229bf215546Sopenharmony_ciendif
230bf215546Sopenharmony_ciif with_platform_windows
231bf215546Sopenharmony_ci  subdir('frontends/wgl')
232bf215546Sopenharmony_ci  if with_gallium_d3d12
233bf215546Sopenharmony_ci    subdir('winsys/d3d12/wgl')
234bf215546Sopenharmony_ci    subdir('targets/libgl-d3d12')
235bf215546Sopenharmony_ci  else
236bf215546Sopenharmony_ci    winsys_d3d12_wgl = declare_dependency()
237bf215546Sopenharmony_ci  endif
238bf215546Sopenharmony_ci  subdir('targets/wgl')
239bf215546Sopenharmony_ci  subdir('targets/libgl-gdi')
240bf215546Sopenharmony_ciendif
241bf215546Sopenharmony_ciif with_tests
242bf215546Sopenharmony_ci  subdir('targets/graw-null')
243bf215546Sopenharmony_ci  if with_platform_windows
244bf215546Sopenharmony_ci    subdir('targets/graw-gdi')
245bf215546Sopenharmony_ci  elif with_glx == 'gallium-xlib'
246bf215546Sopenharmony_ci    subdir('targets/graw-xlib')
247bf215546Sopenharmony_ci  endif
248bf215546Sopenharmony_ci  subdir('tests')
249bf215546Sopenharmony_ciendif
250bf215546Sopenharmony_ciif with_swrast_vk
251bf215546Sopenharmony_ci  subdir('frontends/lavapipe')
252bf215546Sopenharmony_ci  subdir('targets/lavapipe')
253bf215546Sopenharmony_ciendif
254