Debian Codegraph @

src/meson.build

raw
1 config_cfg = configuration_data()
2 config_cfg.set('VERSION', intel_vaapi_driver_version)
3 config_cfg.set('VA_DRIVER_INIT_FUNC', va_driver_init_func)
4 config_cfg.set('INTEL_DRIVER_MAJOR_VERSION', intel_vaapi_driver_major_version)
5 config_cfg.set('INTEL_DRIVER_MINOR_VERSION', intel_vaapi_driver_minor_version)
6 config_cfg.set('INTEL_DRIVER_MICRO_VERSION', intel_vaapi_driver_micro_version)
7 config_cfg.set('INTEL_DRIVER_PRE_VERSION', intel_vaapi_driver_pre_version)
8 config_cfg.set10('HAVE_HYBRID_CODEC', get_option('enable_hybrid_codec'))
9 if WITH_X11
10 config_cfg.set10('HAVE_VA_X11', 1)
11 endif
12 if WITH_WAYLAND
13 config_cfg.set10('HAVE_VA_WAYLAND', 1)
14 endif
15 if cc.has_function('log2f')
16 config_cfg.set('HAVE_LOG2F', 1)
17 endif
18
19 config_file = configure_file(
20 output : 'config.h',
21 configuration : config_cfg)
22
23 if git.found()
24 git_version = run_command(
25 git, '--git-dir', join_paths(meson.source_root(), '.git'),
26 'describe', '--tags')
27 intel_driver_git_version = git_version.stdout().strip()
28 else
29 intel_driver_git_version = intel_vaapi_driver_version
30 endif
31
32 version_cfg = configuration_data()
33 version_cfg.set('INTEL_DRIVER_GIT_VERSION', intel_driver_git_version)
34
35 version_file = configure_file(
36 input : 'intel_version.h.in',
37 output : 'intel_version.h',
38 configuration : version_cfg)
39
40 sources = [
41 'dso_utils.c',
42 'gen6_mfc.c',
43 'gen6_mfc_common.c',
44 'gen6_mfd.c',
45 'gen6_vme.c',
46 'gen7_vme.c',
47 'gen7_mfc.c',
48 'gen7_mfd.c',
49 'gen75_mfd.c',
50 'gen75_mfc.c',
51 'gen8_encoder_vp8.c',
52 'gen8_mfc.c',
53 'gen8_mfd.c',
54 'gen8_vme.c',
55 'gen9_encoder_vp8.c',
56 'gen9_vme.c',
57 'gen9_mfc.c',
58 'gen9_mfc_hevc.c',
59 'gen9_mfd.c',
60 'gen9_vdenc.c',
61 'gen75_picture_process.c',
62 'gen75_vme.c',
63 'gen75_vpp_gpe.c',
64 'gen75_vpp_vebox.c',
65 'gen9_post_processing.c',
66 'i965_avc_bsd.c',
67 'i965_avc_hw_scoreboard.c',
68 'i965_avc_ildb.c',
69 'i965_decoder_utils.c',
70 'i965_device_info.c',
71 'i965_drv_video.c',
72 'i965_encoder.c',
73 'i965_encoder_utils.c',
74 'i965_encoder_vp8.c',
75 'i965_media.c',
76 'i965_media_h264.c',
77 'i965_media_mpeg2.c',
78 'i965_gpe_utils.c',
79 'i965_post_processing.c',
80 'i965_yuv_coefs.c',
81 'gen8_post_processing.c',
82 'i965_render.c',
83 'i965_vpp_avs.c',
84 'gen8_render.c',
85 'gen9_render.c',
86 'intel_batchbuffer.c',
87 'intel_batchbuffer_dump.c',
88 'intel_driver.c',
89 'intel_memman.c',
90 'object_heap.c',
91 'intel_media_common.c',
92 'vp8_probs.c',
93 'vp9_probs.c',
94 'vpx_quant.c',
95 'gen9_vp9_encoder_kernels.c',
96 'gen9_vp9_const_def.c',
97 'gen9_vp9_encoder.c',
98 'intel_common_vpp_internal.c',
99 'i965_encoder_const_def.c',
100 'i965_avc_const_def.c',
101 'i965_avc_encoder_kernels.c',
102 'i965_avc_encoder_common.c',
103 'i965_avc_encoder.c',
104 'gen9_hevc_enc_kernels_binary.c',
105 'gen9_hevc_encoder.c',
106 'gen9_hevc_enc_utils.c',
107 'gen10_encoder_vp8.c',
108 'gen10_hcp_common.c',
109 'gen10_hevc_enc_kernels_binary.c',
110 'gen10_hevc_enc_common.c',
111 'gen10_hevc_encoder.c',
112 'gen10_huc_common.c',
113 'gen10_vdenc_common.c',
114 'gen10_vdenc_vp9.c',
115 ]
116
117 headers = [
118 'dso_utils.h',
119 'gen6_mfc.h',
120 'gen6_mfd.h',
121 'gen6_vme.h',
122 'gen7_mfd.h',
123 'gen75_picture_process.h',
124 'gen75_vpp_gpe.h',
125 'gen75_vpp_vebox.h',
126 'gen8_post_processing.h',
127 'gen9_mfd.h',
128 'gen9_mfc.h',
129 'gen9_vdenc.h',
130 'i965_avc_bsd.h',
131 'i965_avc_hw_scoreboard.h',
132 'i965_avc_ildb.h',
133 'i965_decoder.h',
134 'i965_decoder_utils.h',
135 'i965_defines.h',
136 'i965_drv_video.h',
137 'i965_encoder.h',
138 'i965_encoder_utils.h',
139 'i965_encoder_vp8.h',
140 'i965_media.h',
141 'i965_media_h264.h',
142 'i965_media_mpeg2.h',
143 'i965_mutext.h',
144 'i965_gpe_utils.h',
145 'i965_pciids.h',
146 'i965_post_processing.h',
147 'i965_render.h',
148 'i965_structs.h',
149 'i965_vpp_avs.h',
150 'i965_yuv_coefs.h',
151 'intel_batchbuffer.h',
152 'intel_batchbuffer_dump.h',
153 'intel_compiler.h',
154 'intel_driver.h',
155 'intel_media.h',
156 'intel_memman.h',
157 'object_heap.h',
158 'vp8_probs.h',
159 'vp9_probs.h',
160 'vpx_quant.h',
161 'sysdeps.h',
162 'va_backend_compat.h',
163 'i965_fourcc.h',
164 'gen9_vp9_encoder.h',
165 'gen9_vp9_encapi.h',
166 'gen9_vp9_const_def.h',
167 'gen9_vp9_encoder_kernels.h',
168 'intel_gen_vppapi.h',
169 'intel_common_vpp_internal.h',
170 'i965_encoder_common.h',
171 'i965_encoder_api.h',
172 'i965_avc_const_def.h',
173 'i965_avc_encoder_kernels.h',
174 'i965_avc_encoder.h',
175 'i965_avc_encoder_common.h',
176 'gen9_hevc_enc_const_def.h',
177 'gen9_hevc_enc_kernels.h',
178 'gen9_hevc_enc_kernels_binary.h',
179 'gen9_hevc_enc_utils.h',
180 'gen9_hevc_encoder.h',
181 'gen10_hcp_common.h',
182 'gen10_hevc_enc_kernels_binary.h',
183 'gen10_hevc_enc_common.h',
184 'gen10_hevc_encoder.h',
185 'gen10_hevc_enc_const_def.h',
186 'gen10_huc_common.h',
187 'gen10_vdenc_common.h',
188 'gen10_vdenc_vp9.h',
189 ]
190
191 if WITH_X11
192 sources += 'i965_output_dri.c'
193 headers += 'i965_output_dri.h'
194 endif
195
196 if WITH_WAYLAND
197 protocol_header = custom_target(
198 'wayland-drm-client-protocol_h',
199 output : 'wayland-drm-client-protocol.h',
200 input : 'wayland-drm.xml',
201 command : [ wl_scanner, 'client-header', '@INPUT@', '@OUTPUT@' ])
202
203 sources += 'i965_output_wayland.c'
204 headers += [ 'i965_output_wayland.h',
205 protocol_header ]
206 endif
207
208 cflags = [
209 '-DVA_DRIVERS_PATH="' + driverdir + '"',
210 '-DHAVE_CONFIG_H'
211 ]
212
213 if thread_dep.found()
214 cflags += [ '-DPTHREADS' ]
215 endif
216
217 shared_deps = [
218 dl_dep,
219 mathlib_dep,
220 thread_dep,
221 libdrm_dep,
222 libdrm_intel_dep,
223 libva_dep,
224 ]
225
226 if WITH_X11
227 shared_deps += [ libva_x11_dep ]
228 endif
229
230 if WITH_WAYLAND
231 shared_deps += [ wayland_client_dep, libva_wayland_dep ]
232 endif
233
234 shared_sources = [
235 sources,
236 headers,
237 config_file,
238 version_file,
239 ]
240
241 libi965_drv_video = static_library(
242 'i965_drv_video',
243 c_args : cflags,
244 sources : shared_sources,
245 dependencies : shared_deps)
246
247 i965_drv_video = shared_module(
248 'i965_drv_video',
249 name_prefix : '',
250 install : true,
251 install_dir : driverdir,
252 link_whole : libi965_drv_video,
253 dependencies : shared_deps)