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') 247ec681f3Smrginc_gallium_winsys_sw = include_directories('winsys/sw') 2501e04c3fSmrg 2601e04c3fSmrgsubdir('auxiliary') 2701e04c3fSmrgsubdir('auxiliary/pipe-loader') 2801e04c3fSmrgsubdir('winsys/sw/null') 2901e04c3fSmrgif with_dri 3001e04c3fSmrg subdir('winsys/sw/dri') 3101e04c3fSmrgelse 3201e04c3fSmrg libswdri = [] 3301e04c3fSmrgendif 3401e04c3fSmrgif with_gallium_drisw_kms 3501e04c3fSmrg subdir('winsys/sw/kms-dri') 3601e04c3fSmrgelse 3701e04c3fSmrg libswkmsdri = [] 3801e04c3fSmrgendif 397ec681f3Smrgif with_platform_windows 407ec681f3Smrg subdir('winsys/sw/gdi') 417ec681f3Smrgelse 427ec681f3Smrg libwsgdi = null_dep 437ec681f3Smrgendif 4401e04c3fSmrgsubdir('winsys/sw/wrapper') 4501e04c3fSmrgif with_platform_haiku 4601e04c3fSmrg subdir('winsys/sw/hgl') 4701e04c3fSmrgendif 4801e04c3fSmrgif with_gallium_swr 4901e04c3fSmrg subdir('drivers/swr') 5001e04c3fSmrgelse 5101e04c3fSmrg driver_swr = declare_dependency() 5201e04c3fSmrgendif 5301e04c3fSmrgif with_gallium_softpipe 5401e04c3fSmrg subdir('drivers/softpipe') 557ec681f3Smrg if draw_with_llvm 5601e04c3fSmrg subdir('drivers/llvmpipe') 5701e04c3fSmrg endif 5801e04c3fSmrgelse 5901e04c3fSmrg driver_swrast = declare_dependency() 6001e04c3fSmrgendif 617ec681f3Smrgif with_gallium_asahi 627ec681f3Smrg subdir('drivers/asahi') 637ec681f3Smrgelse 647ec681f3Smrg driver_asahi = declare_dependency() 657ec681f3Smrgendif 6601e04c3fSmrgif with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600 6701e04c3fSmrg subdir('winsys/radeon/drm') 6801e04c3fSmrgendif 6901e04c3fSmrgif with_gallium_r300 7001e04c3fSmrg subdir('drivers/r300') 7101e04c3fSmrgelse 7201e04c3fSmrg driver_r300 = declare_dependency() 7301e04c3fSmrgendif 7401e04c3fSmrgif with_gallium_r600 7501e04c3fSmrg subdir('drivers/r600') 7601e04c3fSmrgelse 7701e04c3fSmrg driver_r600 = declare_dependency() 7801e04c3fSmrgendif 7901e04c3fSmrgif with_gallium_radeonsi 8001e04c3fSmrg subdir('winsys/amdgpu/drm') 8101e04c3fSmrg subdir('drivers/radeonsi') 8201e04c3fSmrgelse 8301e04c3fSmrg driver_radeonsi = declare_dependency() 8401e04c3fSmrgendif 8501e04c3fSmrgif with_gallium_nouveau 8601e04c3fSmrg subdir('winsys/nouveau/drm') 8701e04c3fSmrg subdir('drivers/nouveau') 8801e04c3fSmrgelse 8901e04c3fSmrg driver_nouveau = declare_dependency() 9001e04c3fSmrgendif 9101e04c3fSmrgif with_gallium_freedreno 9201e04c3fSmrg subdir('winsys/freedreno/drm') 9301e04c3fSmrg subdir('drivers/freedreno') 9401e04c3fSmrgelse 9501e04c3fSmrg driver_freedreno = declare_dependency() 9601e04c3fSmrgendif 9701e04c3fSmrgif with_gallium_vc4 9801e04c3fSmrg subdir('winsys/vc4/drm') 9901e04c3fSmrg subdir('drivers/vc4') 10001e04c3fSmrgelse 10101e04c3fSmrg driver_vc4 = declare_dependency() 10201e04c3fSmrgendif 103361fc4cbSmayaif with_gallium_panfrost 104361fc4cbSmaya subdir('winsys/panfrost/drm') 105361fc4cbSmaya subdir('drivers/panfrost') 10601e04c3fSmrgelse 107361fc4cbSmaya driver_panfrost = declare_dependency() 10801e04c3fSmrgendif 10901e04c3fSmrgif with_gallium_etnaviv 11001e04c3fSmrg subdir('winsys/etnaviv/drm') 11101e04c3fSmrg subdir('drivers/etnaviv') 11201e04c3fSmrgelse 11301e04c3fSmrg driver_etnaviv = declare_dependency() 11401e04c3fSmrgendif 115361fc4cbSmayaif with_gallium_kmsro 116361fc4cbSmaya subdir('winsys/kmsro/drm') 117361fc4cbSmayaelse 118361fc4cbSmaya driver_kmsro = declare_dependency() 119361fc4cbSmayaendif 120361fc4cbSmayaif with_gallium_v3d 121361fc4cbSmaya subdir('winsys/v3d/drm') 122361fc4cbSmaya subdir('drivers/v3d') 12301e04c3fSmrgelse 124361fc4cbSmaya driver_v3d = declare_dependency() 12501e04c3fSmrgendif 12601e04c3fSmrgif with_gallium_tegra 12701e04c3fSmrg subdir('winsys/tegra/drm') 12801e04c3fSmrg subdir('drivers/tegra') 12901e04c3fSmrgelse 13001e04c3fSmrg driver_tegra = declare_dependency() 13101e04c3fSmrgendif 1327ec681f3Smrgif with_gallium_crocus 1337ec681f3Smrg subdir('winsys/crocus/drm') 1347ec681f3Smrg subdir('drivers/crocus') 1357ec681f3Smrgelse 1367ec681f3Smrg driver_crocus = declare_dependency() 1377ec681f3Smrgendif 138361fc4cbSmayaif with_gallium_iris 139361fc4cbSmaya subdir('winsys/iris/drm') 140361fc4cbSmaya subdir('drivers/iris') 141361fc4cbSmayaelse 142361fc4cbSmaya driver_iris = declare_dependency() 143361fc4cbSmayaendif 14401e04c3fSmrgif with_gallium_i915 14501e04c3fSmrg subdir('winsys/i915/drm') 14601e04c3fSmrg subdir('drivers/i915') 14701e04c3fSmrgelse 14801e04c3fSmrg driver_i915 = declare_dependency() 14901e04c3fSmrgendif 15001e04c3fSmrgif with_gallium_svga 1517ec681f3Smrg if not with_platform_windows 1527ec681f3Smrg subdir('winsys/svga/drm') 1537ec681f3Smrg endif 15401e04c3fSmrg subdir('drivers/svga') 15501e04c3fSmrgelse 15601e04c3fSmrg driver_svga = declare_dependency() 15701e04c3fSmrgendif 15801e04c3fSmrgif with_gallium_virgl 1597ec681f3Smrg subdir('winsys/virgl/common') 16001e04c3fSmrg subdir('winsys/virgl/drm') 16101e04c3fSmrg subdir('winsys/virgl/vtest') 16201e04c3fSmrg subdir('drivers/virgl') 16301e04c3fSmrgelse 16401e04c3fSmrg driver_virgl = declare_dependency() 16501e04c3fSmrgendif 166361fc4cbSmayaif with_gallium_lima 167361fc4cbSmaya subdir('winsys/lima/drm') 168361fc4cbSmaya subdir('drivers/lima') 169361fc4cbSmayaelse 170361fc4cbSmaya driver_lima = declare_dependency() 171361fc4cbSmayaendif 1727ec681f3Smrgif with_gallium_zink 1737ec681f3Smrg subdir('drivers/zink') 1747ec681f3Smrgelse 1757ec681f3Smrg driver_zink = declare_dependency() 1767ec681f3Smrgendif 1777ec681f3Smrgif with_gallium_d3d12 1787ec681f3Smrg subdir('drivers/d3d12') 1797ec681f3Smrgelse 1807ec681f3Smrg driver_d3d12 = declare_dependency() 1817ec681f3Smrgendif 18201e04c3fSmrgif with_gallium_opencl 18301e04c3fSmrg # TODO: this isn't really clover specific, but ATM clover is the only 18401e04c3fSmrg # consumer 18501e04c3fSmrg subdir('targets/pipe-loader') 18601e04c3fSmrg 1877ec681f3Smrg subdir('frontends/clover') 18801e04c3fSmrg subdir('targets/opencl') 18901e04c3fSmrgendif 19001e04c3fSmrgif with_dri 1917ec681f3Smrg subdir('frontends/dri') 19201e04c3fSmrg subdir('targets/dri') 19301e04c3fSmrgendif 1947ec681f3Smrgif with_osmesa 1957ec681f3Smrg subdir('frontends/osmesa') 19601e04c3fSmrg subdir('targets/osmesa') 19701e04c3fSmrgendif 19801e04c3fSmrgif with_glx == 'gallium-xlib' 19901e04c3fSmrg subdir('winsys/sw/xlib') 2007ec681f3Smrg subdir('frontends/glx/xlib') 20101e04c3fSmrg subdir('targets/libgl-xlib') 20201e04c3fSmrgendif 20301e04c3fSmrgif with_gallium_vdpau 2047ec681f3Smrg subdir('frontends/vdpau') 20501e04c3fSmrg subdir('targets/vdpau') 20601e04c3fSmrgendif 20701e04c3fSmrgif with_gallium_xvmc 2087ec681f3Smrg subdir('frontends/xvmc') 20901e04c3fSmrg subdir('targets/xvmc') 21001e04c3fSmrgendif 21101e04c3fSmrgif with_gallium_omx != 'disabled' 2127ec681f3Smrg subdir('frontends/omx') 21301e04c3fSmrg subdir('targets/omx') 21401e04c3fSmrgendif 21501e04c3fSmrgif with_gallium_va 2167ec681f3Smrg subdir('frontends/va') 21701e04c3fSmrg subdir('targets/va') 21801e04c3fSmrgendif 21901e04c3fSmrgif with_gallium_xa 2207ec681f3Smrg subdir('frontends/xa') 22101e04c3fSmrg subdir('targets/xa') 22201e04c3fSmrgendif 22301e04c3fSmrgif with_platform_haiku 2247ec681f3Smrg subdir('frontends/hgl') 22501e04c3fSmrg subdir('targets/haiku-softpipe') 22601e04c3fSmrgendif 22701e04c3fSmrgif with_gallium_st_nine 2287ec681f3Smrg subdir('frontends/nine') 22901e04c3fSmrg subdir('targets/d3dadapter9') 23001e04c3fSmrgendif 2317ec681f3Smrgif with_gallium_st_d3d10umd 2327ec681f3Smrg subdir('frontends/d3d10umd') 2337ec681f3Smrg subdir('targets/d3d10sw') 2347ec681f3Smrgendif 2357ec681f3Smrgif with_platform_windows 2367ec681f3Smrg subdir('frontends/wgl') 2377ec681f3Smrg if with_gallium_d3d12 2387ec681f3Smrg subdir('winsys/d3d12/wgl') 2397ec681f3Smrg subdir('targets/libgl-d3d12') 2407ec681f3Smrg else 2417ec681f3Smrg winsys_d3d12_wgl = declare_dependency() 2427ec681f3Smrg endif 2437ec681f3Smrg subdir('targets/wgl') 2447ec681f3Smrg subdir('targets/libgl-gdi') 2457ec681f3Smrgendif 24601e04c3fSmrgif with_tests 24701e04c3fSmrg subdir('targets/graw-null') 2487ec681f3Smrg if with_platform_windows 2497ec681f3Smrg subdir('targets/graw-gdi') 2507ec681f3Smrg elif with_glx == 'gallium-xlib' 25101e04c3fSmrg subdir('targets/graw-xlib') 25201e04c3fSmrg endif 25301e04c3fSmrg subdir('tests') 25401e04c3fSmrgendif 2557ec681f3Smrgif with_swrast_vk 2567ec681f3Smrg subdir('frontends/lavapipe') 2577ec681f3Smrg subdir('targets/lavapipe') 2587ec681f3Smrgendif 259