• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2017 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21inc_mesa = include_directories('mesa')
22inc_mapi = include_directories('mapi')
23inc_src = include_directories('.')
24inc_gallium = include_directories('gallium/include')
25inc_gallium_aux = include_directories('gallium/auxiliary')
26inc_amd_common = include_directories('amd/common')
27inc_tool = include_directories('tool')
28inc_virtio_gpu = include_directories('virtio/virtio-gpu')
29pps_datasources = []
30pps_includes = []
31
32if with_llvm
33  inc_amd_common_llvm = include_directories('amd/llvm')
34else
35  inc_amd_common_llvm = []
36endif
37
38libglsl_util = static_library(
39  'glsl_util',
40  files(
41    'mesa/main/extensions_table.c',
42    'mesa/program/prog_parameter.c',
43    'mesa/program/symbol_table.c',
44    'mesa/program/dummy_errors.c',
45  ),
46  include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
47  dependencies : dep_valgrind,
48  gnu_symbol_visibility : 'hidden',
49  build_by_default : false,
50)
51
52sha1_h = custom_target(
53  'git_sha1.h',
54  output : 'git_sha1.h',
55  command : [prog_python, git_sha1_gen_py, '--output', '@OUTPUT@'],
56  build_by_default : true,
57  build_always_stale : true, # commit sha1 can change without having touched these files
58)
59
60subdir('gtest')
61if cc.get_argument_syntax() == 'msvc'
62  subdir('getopt')
63else
64  idep_getopt = null_dep
65endif
66subdir('android_stub')
67subdir('c11/impl')
68subdir('util')
69subdir('mapi')
70# TODO: opengl
71subdir('compiler')
72if with_tools.contains('drm-shim')
73  subdir('drm-shim')
74endif
75if with_imgui
76  subdir('imgui')
77endif
78if with_platform_wayland
79  subdir('egl/wayland/wayland-drm')
80endif
81if with_any_vk or with_gallium_zink
82  subdir('vulkan')
83endif
84if with_any_intel
85  subdir('intel')
86endif
87if with_gallium_radeonsi or with_amd_vk
88  subdir('amd')
89endif
90if with_any_broadcom
91  subdir('broadcom')
92endif
93if with_gallium_etnaviv
94  subdir('etnaviv')
95endif
96if with_gallium_freedreno or with_freedreno_vk or with_tools.contains('freedreno')
97  subdir('freedreno')
98endif
99if with_imagination_vk
100  subdir('imagination')
101endif
102if with_gallium_panfrost or with_gallium_lima or with_panfrost_vk or with_tools.contains('panfrost')
103  subdir('panfrost')
104endif
105if with_gallium_virgl or with_virtio_vk
106  subdir('virtio')
107endif
108if with_microsoft_clc or with_gallium_d3d12 or with_spirv_to_dxil or with_microsoft_vk
109  subdir('microsoft')
110endif
111if with_gallium_nouveau
112  subdir('nouveau')
113endif
114if with_gallium_asahi or with_tools.contains('asahi')
115  subdir('asahi')
116endif
117subdir('loader')
118if with_platform_haiku
119  subdir('hgl')
120endif
121if with_gbm
122  subdir('gbm')
123else
124  inc_gbm = []
125endif
126if with_gallium
127  subdir('mesa')
128  subdir('gallium')
129  if with_glx == 'dri'
130     subdir('glx')
131  endif
132  # This has to be here since it requires libgallium, and subdir cannot
133  # contain ..
134  if with_tests
135    subdir('mesa/main/tests')
136  endif
137  if with_tests and with_shared_glapi
138    subdir('mesa/state_tracker/tests')
139  endif
140endif
141if with_egl
142  subdir('egl')
143endif
144
145# This must be after at least mesa, glx, and gallium, since libgl will be
146# defined in one of those subdirs depending on the glx provider.
147if with_glx != 'disabled' and not with_glvnd
148  pkg.generate(
149    name : 'gl',
150    description : 'Mesa OpenGL Library',
151    version : meson.project_version(),
152    libraries : libgl,
153    libraries_private : gl_priv_libs,
154    requires_private : gl_priv_reqs,
155    variables : ['glx_tls=yes'],
156  )
157endif
158
159subdir('tool')
160