d05e67630c697a5192b02adecb08a766f764c1c9
[mesa.git] / src / gallium / meson.build
1 # Copyright © 2017 Dylan Baker
2 # Copyright © 2017 Intel Corporation
3
4 # Permission is hereby granted, free of charge, to any person obtaining a copy
5 # of this software and associated documentation files (the "Software"), to deal
6 # in the Software without restriction, including without limitation the rights
7 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 # copies of the Software, and to permit persons to whom the Software is
9 # furnished to do so, subject to the following conditions:
10
11 # The above copyright notice and this permission notice shall be included in
12 # all copies or substantial portions of the Software.
13
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 # SOFTWARE.
21
22 inc_gallium_drivers = include_directories('drivers')
23 inc_gallium_winsys = include_directories('winsys')
24
25 subdir('auxiliary')
26 subdir('auxiliary/pipe-loader')
27 subdir('drivers/ddebug')
28 subdir('drivers/noop')
29 subdir('drivers/trace')
30 subdir('drivers/rbug')
31 subdir('winsys/sw/null')
32 if with_dri
33 subdir('winsys/sw/dri')
34 else
35 libswdri = []
36 endif
37 if with_gallium_drisw_kms
38 subdir('winsys/sw/kms-dri')
39 else
40 libswkmsdri = []
41 endif
42 subdir('winsys/sw/wrapper')
43 if with_gallium_swr
44 if meson.version().version_compare('< 0.44.0')
45 error('SWR requires meson 0.44.0 or greater.')
46 endif
47 subdir('drivers/swr')
48 else
49 driver_swr = declare_dependency()
50 endif
51 if with_gallium_softpipe
52 subdir('drivers/softpipe')
53 if with_llvm
54 subdir('drivers/llvmpipe')
55 endif
56 else
57 driver_swrast = declare_dependency()
58 endif
59 if with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600
60 subdir('winsys/radeon/drm')
61 endif
62 if with_gallium_r300
63 subdir('drivers/r300')
64 else
65 driver_r300 = declare_dependency()
66 endif
67 if with_gallium_r600
68 subdir('drivers/r600')
69 else
70 driver_r600 = declare_dependency()
71 endif
72 if with_gallium_radeonsi
73 subdir('winsys/amdgpu/drm')
74 subdir('drivers/radeon')
75 subdir('drivers/radeonsi')
76 else
77 driver_radeonsi = declare_dependency()
78 endif
79 if with_gallium_nouveau
80 subdir('winsys/nouveau/drm')
81 subdir('drivers/nouveau')
82 else
83 driver_nouveau = declare_dependency()
84 endif
85 if with_gallium_freedreno
86 subdir('winsys/freedreno/drm')
87 subdir('drivers/freedreno')
88 else
89 driver_freedreno = declare_dependency()
90 endif
91 if with_gallium_vc4
92 subdir('winsys/vc4/drm')
93 subdir('drivers/vc4')
94 else
95 driver_vc4 = declare_dependency()
96 endif
97 if with_gallium_pl111
98 subdir('winsys/pl111/drm')
99 else
100 driver_pl111 = declare_dependency()
101 endif
102 if with_gallium_vc5
103 subdir('winsys/vc5/drm')
104 subdir('drivers/vc5')
105 else
106 driver_vc5 = declare_dependency()
107 endif
108 if with_gallium_etnaviv
109 subdir('winsys/etnaviv/drm')
110 subdir('drivers/etnaviv')
111 else
112 driver_etnaviv = declare_dependency()
113 endif
114 if with_gallium_imx
115 subdir('winsys/imx/drm')
116 else
117 driver_imx = declare_dependency()
118 endif
119 if with_gallium_i915
120 subdir('winsys/i915/drm')
121 subdir('drivers/i915')
122 else
123 driver_i915 = declare_dependency()
124 endif
125 if with_gallium_svga
126 subdir('winsys/svga/drm')
127 subdir('drivers/svga')
128 else
129 driver_svga = declare_dependency()
130 endif
131 if with_gallium_virgl
132 subdir('winsys/virgl/drm')
133 subdir('winsys/virgl/vtest')
134 subdir('drivers/virgl')
135 else
136 driver_virgl = declare_dependency()
137 endif
138 if with_gallium_vdpau
139 subdir('state_trackers/vdpau')
140 endif
141 if with_gallium_xvmc
142 subdir('state_trackers/xvmc')
143 endif
144 if with_gallium_omx
145 subdir('state_trackers/omx_bellagio')
146 endif
147 if with_gallium_va
148 subdir('state_trackers/va')
149 endif
150 if with_gallium_xa
151 subdir('state_trackers/xa')
152 endif
153 if with_gallium_st_nine
154 subdir('state_trackers/nine')
155 endif
156 if with_gallium_opencl
157 # TODO: this isn't really clover specific, but ATM clover is the only
158 # consumer
159 subdir('targets/pipe-loader')
160
161 if meson.version().version_compare('< 0.44.0')
162 error('OpenCL requires meson 0.44.0 or greater.')
163 endif
164 subdir('state_trackers/clover')
165 subdir('targets/opencl')
166 endif
167 if with_dri
168 subdir('state_trackers/dri')
169 subdir('targets/dri')
170 endif
171 if with_osmesa == 'gallium'
172 subdir('state_trackers/osmesa')
173 subdir('targets/osmesa')
174 endif
175 if with_glx == 'gallium-xlib'
176 subdir('winsys/sw/xlib')
177 subdir('state_trackers/glx/xlib')
178 subdir('targets/libgl-xlib')
179 endif
180 if with_gallium_vdpau
181 subdir('targets/vdpau')
182 endif
183 if with_gallium_xvmc
184 subdir('targets/xvmc')
185 endif
186 if with_gallium_omx
187 subdir('targets/omx-bellagio')
188 endif
189 if with_gallium_va
190 subdir('targets/va')
191 endif
192 if with_gallium_xa
193 subdir('targets/xa')
194 endif
195 if with_gallium_st_nine
196 subdir('targets/d3dadapter9')
197 endif
198 # TODO: tests