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