meson: Add Haiku platform support v4
[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_platform_haiku
44 subdir('winsys/sw/hgl')
45 endif
46 if with_gallium_swr
47 if meson.version().version_compare('< 0.44.0')
48 error('SWR requires meson 0.44.0 or greater.')
49 endif
50 subdir('drivers/swr')
51 else
52 driver_swr = declare_dependency()
53 endif
54 if with_gallium_softpipe
55 subdir('drivers/softpipe')
56 if with_llvm
57 subdir('drivers/llvmpipe')
58 endif
59 else
60 driver_swrast = declare_dependency()
61 endif
62 if with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600
63 subdir('winsys/radeon/drm')
64 endif
65 if with_gallium_r300
66 subdir('drivers/r300')
67 else
68 driver_r300 = declare_dependency()
69 endif
70 if with_gallium_r600
71 subdir('drivers/r600')
72 else
73 driver_r600 = declare_dependency()
74 endif
75 if with_gallium_radeonsi
76 subdir('winsys/amdgpu/drm')
77 subdir('drivers/radeon')
78 subdir('drivers/radeonsi')
79 else
80 driver_radeonsi = declare_dependency()
81 endif
82 if with_gallium_nouveau
83 subdir('winsys/nouveau/drm')
84 subdir('drivers/nouveau')
85 else
86 driver_nouveau = declare_dependency()
87 endif
88 if with_gallium_freedreno
89 subdir('winsys/freedreno/drm')
90 subdir('drivers/freedreno')
91 else
92 driver_freedreno = declare_dependency()
93 endif
94 if with_gallium_vc4
95 subdir('winsys/vc4/drm')
96 subdir('drivers/vc4')
97 else
98 driver_vc4 = declare_dependency()
99 endif
100 if with_gallium_pl111
101 subdir('winsys/pl111/drm')
102 else
103 driver_pl111 = declare_dependency()
104 endif
105 if with_gallium_vc5
106 subdir('winsys/vc5/drm')
107 subdir('drivers/vc5')
108 else
109 driver_vc5 = declare_dependency()
110 endif
111 if with_gallium_etnaviv
112 subdir('winsys/etnaviv/drm')
113 subdir('drivers/etnaviv')
114 else
115 driver_etnaviv = declare_dependency()
116 endif
117 if with_gallium_imx
118 subdir('winsys/imx/drm')
119 else
120 driver_imx = declare_dependency()
121 endif
122 if with_gallium_i915
123 subdir('winsys/i915/drm')
124 subdir('drivers/i915')
125 else
126 driver_i915 = declare_dependency()
127 endif
128 if with_gallium_svga
129 subdir('winsys/svga/drm')
130 subdir('drivers/svga')
131 else
132 driver_svga = declare_dependency()
133 endif
134 if with_gallium_virgl
135 subdir('winsys/virgl/drm')
136 subdir('winsys/virgl/vtest')
137 subdir('drivers/virgl')
138 else
139 driver_virgl = declare_dependency()
140 endif
141 if with_gallium_vdpau
142 subdir('state_trackers/vdpau')
143 endif
144 if with_gallium_xvmc
145 subdir('state_trackers/xvmc')
146 endif
147 if with_gallium_omx
148 subdir('state_trackers/omx_bellagio')
149 endif
150 if with_gallium_va
151 subdir('state_trackers/va')
152 endif
153 if with_gallium_xa
154 subdir('state_trackers/xa')
155 endif
156 if with_gallium_st_nine
157 subdir('state_trackers/nine')
158 endif
159 if with_platform_haiku
160 subdir('state_trackers/hgl')
161 endif
162 if with_gallium_opencl
163 # TODO: this isn't really clover specific, but ATM clover is the only
164 # consumer
165 subdir('targets/pipe-loader')
166
167 if meson.version().version_compare('< 0.44.0')
168 error('OpenCL requires meson 0.44.0 or greater.')
169 endif
170 subdir('state_trackers/clover')
171 subdir('targets/opencl')
172 endif
173 if with_dri
174 subdir('state_trackers/dri')
175 subdir('targets/dri')
176 endif
177 if with_osmesa == 'gallium'
178 subdir('state_trackers/osmesa')
179 subdir('targets/osmesa')
180 endif
181 if with_glx == 'gallium-xlib'
182 subdir('winsys/sw/xlib')
183 subdir('state_trackers/glx/xlib')
184 subdir('targets/libgl-xlib')
185 endif
186 if with_gallium_vdpau
187 subdir('targets/vdpau')
188 endif
189 if with_gallium_xvmc
190 subdir('targets/xvmc')
191 endif
192 if with_gallium_omx
193 subdir('targets/omx-bellagio')
194 endif
195 if with_gallium_va
196 subdir('targets/va')
197 endif
198 if with_gallium_xa
199 subdir('targets/xa')
200 endif
201 if with_platform_haiku
202 subdir('targets/haiku-softpipe')
203 endif
204 if with_gallium_st_nine
205 subdir('targets/d3dadapter9')
206 endif
207 # TODO: tests