radeonsi: try to fix meson
[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/radeonsi')
78 else
79 driver_radeonsi = declare_dependency()
80 endif
81 if with_gallium_nouveau
82 subdir('winsys/nouveau/drm')
83 subdir('drivers/nouveau')
84 else
85 driver_nouveau = declare_dependency()
86 endif
87 if with_gallium_freedreno
88 subdir('winsys/freedreno/drm')
89 subdir('drivers/freedreno')
90 else
91 driver_freedreno = declare_dependency()
92 endif
93 if with_gallium_vc4
94 subdir('winsys/vc4/drm')
95 subdir('drivers/vc4')
96 else
97 driver_vc4 = declare_dependency()
98 endif
99 if with_gallium_pl111
100 subdir('winsys/pl111/drm')
101 else
102 driver_pl111 = declare_dependency()
103 endif
104 if with_gallium_vc5
105 subdir('winsys/vc5/drm')
106 subdir('drivers/vc5')
107 else
108 driver_vc5 = declare_dependency()
109 endif
110 if with_gallium_etnaviv
111 subdir('winsys/etnaviv/drm')
112 subdir('drivers/etnaviv')
113 else
114 driver_etnaviv = declare_dependency()
115 endif
116 if with_gallium_imx
117 subdir('winsys/imx/drm')
118 else
119 driver_imx = declare_dependency()
120 endif
121 if with_gallium_tegra
122 subdir('winsys/tegra/drm')
123 subdir('drivers/tegra')
124 else
125 driver_tegra = declare_dependency()
126 endif
127 if with_gallium_i915
128 subdir('winsys/i915/drm')
129 subdir('drivers/i915')
130 else
131 driver_i915 = declare_dependency()
132 endif
133 if with_gallium_svga
134 subdir('winsys/svga/drm')
135 subdir('drivers/svga')
136 else
137 driver_svga = declare_dependency()
138 endif
139 if with_gallium_virgl
140 subdir('winsys/virgl/drm')
141 subdir('winsys/virgl/vtest')
142 subdir('drivers/virgl')
143 else
144 driver_virgl = declare_dependency()
145 endif
146 if with_gallium_opencl
147 # TODO: this isn't really clover specific, but ATM clover is the only
148 # consumer
149 subdir('targets/pipe-loader')
150
151 if meson.version().version_compare('< 0.44.0')
152 error('OpenCL requires meson 0.44.0 or greater.')
153 endif
154 subdir('state_trackers/clover')
155 subdir('targets/opencl')
156 endif
157 if with_dri
158 subdir('state_trackers/dri')
159 subdir('targets/dri')
160 endif
161 if with_osmesa == 'gallium'
162 subdir('state_trackers/osmesa')
163 subdir('targets/osmesa')
164 endif
165 if with_glx == 'gallium-xlib'
166 subdir('winsys/sw/xlib')
167 subdir('state_trackers/glx/xlib')
168 subdir('targets/libgl-xlib')
169 endif
170 if with_gallium_vdpau
171 subdir('state_trackers/vdpau')
172 subdir('targets/vdpau')
173 endif
174 if with_gallium_xvmc
175 subdir('state_trackers/xvmc')
176 subdir('targets/xvmc')
177 endif
178 if with_gallium_omx != 'disabled'
179 subdir('state_trackers/omx')
180 subdir('targets/omx')
181 endif
182 if with_gallium_va
183 subdir('state_trackers/va')
184 subdir('targets/va')
185 endif
186 if with_gallium_xa
187 subdir('state_trackers/xa')
188 subdir('targets/xa')
189 endif
190 if with_platform_haiku
191 subdir('state_trackers/hgl')
192 subdir('targets/haiku-softpipe')
193 endif
194 if with_gallium_st_nine
195 subdir('state_trackers/nine')
196 subdir('targets/d3dadapter9')
197 endif
198 # TODO: tests