meson.build revision 361fc4cb
101e04c3fSmrg# Copyright © 2017 Dylan Baker
201e04c3fSmrg# Copyright © 2017-2018 Intel Corporation
301e04c3fSmrg
401e04c3fSmrg# Permission is hereby granted, free of charge, to any person obtaining a copy
501e04c3fSmrg# of this software and associated documentation files (the "Software"), to deal
601e04c3fSmrg# in the Software without restriction, including without limitation the rights
701e04c3fSmrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
801e04c3fSmrg# copies of the Software, and to permit persons to whom the Software is
901e04c3fSmrg# furnished to do so, subject to the following conditions:
1001e04c3fSmrg
1101e04c3fSmrg# The above copyright notice and this permission notice shall be included in
1201e04c3fSmrg# all copies or substantial portions of the Software.
1301e04c3fSmrg
1401e04c3fSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1501e04c3fSmrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1601e04c3fSmrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1701e04c3fSmrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1801e04c3fSmrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1901e04c3fSmrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2001e04c3fSmrg# SOFTWARE.
2101e04c3fSmrg
2201e04c3fSmrginc_gallium_drivers = include_directories('drivers')
2301e04c3fSmrginc_gallium_winsys = include_directories('winsys')
2401e04c3fSmrg
2501e04c3fSmrgsubdir('auxiliary')
2601e04c3fSmrgsubdir('auxiliary/pipe-loader')
2701e04c3fSmrgsubdir('winsys/sw/null')
2801e04c3fSmrgif with_dri
2901e04c3fSmrg  subdir('winsys/sw/dri')
3001e04c3fSmrgelse
3101e04c3fSmrg  libswdri = []
3201e04c3fSmrgendif
3301e04c3fSmrgif with_gallium_drisw_kms
3401e04c3fSmrg  subdir('winsys/sw/kms-dri')
3501e04c3fSmrgelse
3601e04c3fSmrg  libswkmsdri = []
3701e04c3fSmrgendif
3801e04c3fSmrgsubdir('winsys/sw/wrapper')
3901e04c3fSmrgif with_platform_haiku
4001e04c3fSmrg  subdir('winsys/sw/hgl')
4101e04c3fSmrgendif
4201e04c3fSmrgif with_gallium_swr
4301e04c3fSmrg  subdir('drivers/swr')
4401e04c3fSmrgelse
4501e04c3fSmrg  driver_swr = declare_dependency()
4601e04c3fSmrgendif
4701e04c3fSmrgif with_gallium_softpipe
4801e04c3fSmrg  subdir('drivers/softpipe')
4901e04c3fSmrg  if with_llvm
5001e04c3fSmrg    subdir('drivers/llvmpipe')
5101e04c3fSmrg  endif
5201e04c3fSmrgelse
5301e04c3fSmrg  driver_swrast = declare_dependency()
5401e04c3fSmrgendif
5501e04c3fSmrgif with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600
5601e04c3fSmrg  subdir('winsys/radeon/drm')
5701e04c3fSmrgendif
5801e04c3fSmrgif with_gallium_r300
5901e04c3fSmrg  subdir('drivers/r300')
6001e04c3fSmrgelse
6101e04c3fSmrg  driver_r300 = declare_dependency()
6201e04c3fSmrgendif
6301e04c3fSmrgif with_gallium_r600
6401e04c3fSmrg  subdir('drivers/r600')
6501e04c3fSmrgelse
6601e04c3fSmrg  driver_r600 = declare_dependency()
6701e04c3fSmrgendif
6801e04c3fSmrgif with_gallium_radeonsi
6901e04c3fSmrg  subdir('winsys/amdgpu/drm')
7001e04c3fSmrg  subdir('drivers/radeonsi')
7101e04c3fSmrgelse
7201e04c3fSmrg  driver_radeonsi = declare_dependency()
7301e04c3fSmrgendif
7401e04c3fSmrgif with_gallium_nouveau
7501e04c3fSmrg  subdir('winsys/nouveau/drm')
7601e04c3fSmrg  subdir('drivers/nouveau')
7701e04c3fSmrgelse
7801e04c3fSmrg  driver_nouveau = declare_dependency()
7901e04c3fSmrgendif
8001e04c3fSmrgif with_gallium_freedreno
8101e04c3fSmrg  subdir('winsys/freedreno/drm')
8201e04c3fSmrg  subdir('drivers/freedreno')
8301e04c3fSmrgelse
8401e04c3fSmrg  driver_freedreno = declare_dependency()
8501e04c3fSmrgendif
8601e04c3fSmrgif with_gallium_vc4
8701e04c3fSmrg  subdir('winsys/vc4/drm')
8801e04c3fSmrg  subdir('drivers/vc4')
8901e04c3fSmrgelse
9001e04c3fSmrg  driver_vc4 = declare_dependency()
9101e04c3fSmrgendif
92361fc4cbSmayaif with_gallium_panfrost
93361fc4cbSmaya  subdir('winsys/panfrost/drm')
94361fc4cbSmaya  subdir('drivers/panfrost')
9501e04c3fSmrgelse
96361fc4cbSmaya  driver_panfrost = declare_dependency()
9701e04c3fSmrgendif
9801e04c3fSmrgif with_gallium_etnaviv
9901e04c3fSmrg  subdir('winsys/etnaviv/drm')
10001e04c3fSmrg  subdir('drivers/etnaviv')
10101e04c3fSmrgelse
10201e04c3fSmrg  driver_etnaviv = declare_dependency()
10301e04c3fSmrgendif
104361fc4cbSmayaif with_gallium_kmsro
105361fc4cbSmaya  subdir('winsys/kmsro/drm')
106361fc4cbSmayaelse
107361fc4cbSmaya  driver_kmsro = declare_dependency()
108361fc4cbSmayaendif
109361fc4cbSmayaif with_gallium_v3d
110361fc4cbSmaya  subdir('winsys/v3d/drm')
111361fc4cbSmaya  subdir('drivers/v3d')
11201e04c3fSmrgelse
113361fc4cbSmaya  driver_v3d = declare_dependency()
11401e04c3fSmrgendif
11501e04c3fSmrgif with_gallium_tegra
11601e04c3fSmrg  subdir('winsys/tegra/drm')
11701e04c3fSmrg  subdir('drivers/tegra')
11801e04c3fSmrgelse
11901e04c3fSmrg  driver_tegra = declare_dependency()
12001e04c3fSmrgendif
121361fc4cbSmayaif with_gallium_iris
122361fc4cbSmaya  subdir('winsys/iris/drm')
123361fc4cbSmaya  subdir('drivers/iris')
124361fc4cbSmayaelse
125361fc4cbSmaya  driver_iris = declare_dependency()
126361fc4cbSmayaendif
12701e04c3fSmrgif with_gallium_i915
12801e04c3fSmrg  subdir('winsys/i915/drm')
12901e04c3fSmrg  subdir('drivers/i915')
13001e04c3fSmrgelse
13101e04c3fSmrg  driver_i915 = declare_dependency()
13201e04c3fSmrgendif
13301e04c3fSmrgif with_gallium_svga
13401e04c3fSmrg  subdir('winsys/svga/drm')
13501e04c3fSmrg  subdir('drivers/svga')
13601e04c3fSmrgelse
13701e04c3fSmrg  driver_svga = declare_dependency()
13801e04c3fSmrgendif
13901e04c3fSmrgif with_gallium_virgl
14001e04c3fSmrg  subdir('winsys/virgl/drm')
14101e04c3fSmrg  subdir('winsys/virgl/vtest')
14201e04c3fSmrg  subdir('drivers/virgl')
14301e04c3fSmrgelse
14401e04c3fSmrg  driver_virgl = declare_dependency()
14501e04c3fSmrgendif
146361fc4cbSmayaif with_gallium_lima
147361fc4cbSmaya  subdir('winsys/lima/drm')
148361fc4cbSmaya  subdir('drivers/lima')
149361fc4cbSmayaelse
150361fc4cbSmaya  driver_lima = declare_dependency()
151361fc4cbSmayaendif
15201e04c3fSmrgif with_gallium_opencl
15301e04c3fSmrg  # TODO: this isn't really clover specific, but ATM clover is the only
15401e04c3fSmrg  # consumer
15501e04c3fSmrg  subdir('targets/pipe-loader')
15601e04c3fSmrg
15701e04c3fSmrg  subdir('state_trackers/clover')
15801e04c3fSmrg  subdir('targets/opencl')
15901e04c3fSmrgendif
16001e04c3fSmrgif with_dri
16101e04c3fSmrg  subdir('state_trackers/dri')
16201e04c3fSmrg  subdir('targets/dri')
16301e04c3fSmrgendif
16401e04c3fSmrgif with_osmesa == 'gallium'
16501e04c3fSmrg  subdir('state_trackers/osmesa')
16601e04c3fSmrg  subdir('targets/osmesa')
16701e04c3fSmrgendif
16801e04c3fSmrgif with_glx == 'gallium-xlib'
16901e04c3fSmrg  subdir('winsys/sw/xlib')
17001e04c3fSmrg  subdir('state_trackers/glx/xlib')
17101e04c3fSmrg  subdir('targets/libgl-xlib')
17201e04c3fSmrgendif
17301e04c3fSmrgif with_gallium_vdpau
17401e04c3fSmrg  subdir('state_trackers/vdpau')
17501e04c3fSmrg  subdir('targets/vdpau')
17601e04c3fSmrgendif
17701e04c3fSmrgif with_gallium_xvmc
17801e04c3fSmrg  subdir('state_trackers/xvmc')
17901e04c3fSmrg  subdir('targets/xvmc')
18001e04c3fSmrgendif
18101e04c3fSmrgif with_gallium_omx != 'disabled'
18201e04c3fSmrg  subdir('state_trackers/omx')
18301e04c3fSmrg  subdir('targets/omx')
18401e04c3fSmrgendif
18501e04c3fSmrgif with_gallium_va
18601e04c3fSmrg  subdir('state_trackers/va')
18701e04c3fSmrg  subdir('targets/va')
18801e04c3fSmrgendif
18901e04c3fSmrgif with_gallium_xa
19001e04c3fSmrg  subdir('state_trackers/xa')
19101e04c3fSmrg  subdir('targets/xa')
19201e04c3fSmrgendif
19301e04c3fSmrgif with_platform_haiku
19401e04c3fSmrg  subdir('state_trackers/hgl')
19501e04c3fSmrg  subdir('targets/haiku-softpipe')
19601e04c3fSmrgendif
19701e04c3fSmrgif with_gallium_st_nine
19801e04c3fSmrg  subdir('state_trackers/nine')
19901e04c3fSmrg  subdir('targets/d3dadapter9')
20001e04c3fSmrgendif
20101e04c3fSmrgif with_tests
20201e04c3fSmrg  subdir('targets/graw-null')
20301e04c3fSmrg  if with_glx == 'gallium-xlib'
20401e04c3fSmrg    subdir('targets/graw-xlib')
20501e04c3fSmrg  endif
20601e04c3fSmrg  subdir('tests')
20701e04c3fSmrgendif
208