• 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_amd_common_llvm = include_directories('amd/llvm')
28
29libglsl_util = static_library(
30  'glsl_util',
31  files(
32    'mesa/main/extensions_table.c',
33    'mesa/program/prog_parameter.c',
34    'mesa/program/symbol_table.c',
35    'mesa/program/dummy_errors.c',
36  ),
37  include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
38  gnu_symbol_visibility : 'hidden',
39  build_by_default : false,
40)
41
42sha1_h = custom_target(
43  'git_sha1.h',
44  output : 'git_sha1.h',
45  command : [prog_python, git_sha1_gen_py, '--output', '@OUTPUT@'],
46  build_by_default : true,
47  build_always_stale : true, # commit sha1 can change without having touched these files
48)
49
50subdir('gtest')
51if cc.get_id() == 'msvc'
52  subdir('getopt')
53else
54  idep_getopt = null_dep
55endif
56subdir('android_stub')
57subdir('util')
58subdir('mapi')
59# TODO: opengl
60subdir('compiler')
61if with_tools.contains('drm-shim')
62  subdir('drm-shim')
63endif
64if with_imgui
65  subdir('imgui')
66endif
67if with_platform_wayland
68  subdir('egl/wayland/wayland-drm')
69endif
70if with_any_vk or with_gallium_zink
71  subdir('vulkan')
72endif
73if with_gallium_radeonsi or with_amd_vk
74  subdir('amd')
75endif
76if with_any_broadcom
77  subdir('broadcom')
78endif
79if with_gallium_etnaviv
80  subdir('etnaviv')
81endif
82if with_gallium_freedreno or with_freedreno_vk
83  subdir('freedreno')
84endif
85if with_gallium_panfrost or with_gallium_lima
86  subdir('panfrost')
87endif
88if with_gallium_virgl
89  subdir('virtio')
90endif
91if with_any_intel
92  subdir('intel')
93endif
94subdir('mesa')
95subdir('loader')
96if with_platform_haiku
97  subdir('hgl')
98endif
99if with_glx == 'dri'
100  subdir('glx')
101endif
102if with_gbm
103  subdir('gbm')
104else
105  inc_gbm = []
106endif
107if with_egl
108  subdir('egl')
109endif
110if with_gallium
111  subdir('gallium')
112  # This has to be here since it requires libgallium, and subdir cannot
113  # contain ..
114  if with_tests and with_shared_glapi
115    subdir('mesa/state_tracker/tests')
116  endif
117endif
118
119# This must be after at least mesa, glx, and gallium, since libgl will be
120# defined in one of those subdirs depending on the glx provider.
121if with_glx != 'disabled' and not with_glvnd
122  pkg.generate(
123    name : 'gl',
124    description : 'Mesa OpenGL Library',
125    version : meson.project_version(),
126    libraries : libgl,
127    libraries_private : gl_priv_libs,
128    requires_private : gl_priv_reqs,
129    variables : ['glx_tls=@0@'.format(use_elf_tls ? 'yes' : 'no')],
130  )
131endif
132