blob: 53c8269a99edb975b1c6428116553ead3ad402c1 [file] [log] [blame]
Dylan Bakerd1992252017-09-14 17:57:17 -07001# 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
Dylan Bakerd1992252017-09-14 17:57:17 -070021inc_common = include_directories(
22 '../include', '.', 'mapi', 'mesa', 'gallium/include', 'gallium/auxiliary')
23inc_mesa = include_directories('mesa')
24inc_mapi = include_directories('mapi')
Dylan Baker32180562017-09-20 20:11:32 -070025inc_src = include_directories('.')
Dylan Baker06c66752017-10-20 22:23:15 -070026inc_gallium = include_directories('gallium/include')
27inc_gallium_aux = include_directories('gallium/auxiliary')
Dylan Baker32180562017-09-20 20:11:32 -070028
29libglsl_util = static_library(
30 'glsl_util',
31 files('mesa/main/extensions_table.c', 'mesa/main/imports.c',
32 'mesa/program/prog_parameter.c', 'mesa/program/symbol_table.c',
33 'mesa/program/dummy_errors.c'),
34 include_directories : [inc_common],
35 c_args : [c_vis_args],
36 build_by_default : false,
37)
38
Eric Engestrom05a94a42017-10-24 18:03:39 +010039sha1_h = custom_target(
40 'git_sha1.h',
Dylan Baker32180562017-09-20 20:11:32 -070041 output : 'git_sha1.h',
Eric Engestrom05a94a42017-10-24 18:03:39 +010042 command : [prog_python2, git_sha1_gen_py, '--output', '@OUTPUT@'],
43 build_always : true, # commit sha1 can change without having touched these files
Dylan Baker32180562017-09-20 20:11:32 -070044)
Dylan Bakerd1992252017-09-14 17:57:17 -070045
46subdir('gtest')
47subdir('util')
Dylan Baker32180562017-09-20 20:11:32 -070048subdir('mapi/glapi/gen')
49subdir('mapi')
Dylan Bakerd1992252017-09-14 17:57:17 -070050# TODO: opengl
Dylan Bakerd1992252017-09-14 17:57:17 -070051subdir('compiler')
52subdir('egl/wayland/wayland-drm')
53subdir('vulkan')
Dylan Baker673dda82017-09-20 11:53:29 -070054subdir('amd')
Eric Anholt1ae80182017-10-12 13:53:12 -070055if with_gallium_vc4
56 subdir('broadcom')
57endif
Dylan Bakerd1992252017-09-14 17:57:17 -070058subdir('intel')
Dylan Baker32180562017-09-20 20:11:32 -070059subdir('mesa')
Dylan Bakera47c5252017-09-22 12:55:00 -070060subdir('loader')
61subdir('glx')
Dylan Baker816bf7d12017-09-28 15:53:53 -070062if with_gbm
63 subdir('gbm')
64endif
Dylan Baker108d2572017-10-18 12:20:43 -070065if with_egl
66 subdir('egl')
67endif
Dylan Bakerb1b65392017-09-28 22:25:02 -070068subdir('gallium')
Dylan Baker13752af2017-11-02 16:51:40 -070069
70# This must be after at least mesa, glx, and gallium, since libgl will be
71# defined in one of those subdirs depending on the glx provider.
72if with_glx != 'disabled'
73 pkg.generate(
74 name : 'gl',
75 description : 'Mesa OpenGL Library',
76 version : meson.project_version(),
77 libraries : libgl,
78 libraries_private : gl_priv_libs,
79 requires_private : gl_priv_reqs,
80 variables : ['glx_tls=yes'],
81 )
82endif