forked from elFarto/nvidia-vaapi-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
91 lines (82 loc) · 2.26 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
project(
'nvidia-vaapi-driver',
'c',
version: '0.1',
default_options: [
'prefix=/usr',
'c_std=c11',
'warning_level=2',
],
license: 'MIT',
meson_version: '>= 0.58.0',
)
cc = meson.get_compiler('c')
deps = [
cc.find_library('m'),
cc.find_library('dl', required : false),
dependency('egl'),
dependency('ffnvcodec', version: '>= 11.1.5.1'),
dependency('libdrm', version: '>=2.4.60').partial_dependency(compile_args: true),
dependency('threads'),
]
libva_deps = dependency('libva', version: '>= 1.8.0').partial_dependency(compile_args: true)
deps += [libva_deps]
gst_codecs_deps = dependency('gstreamer-codecparsers-1.0', required: false)
if cc.get_argument_syntax() == 'gcc'
add_project_arguments(
cc.get_supported_arguments([
'-Wno-missing-field-initializers',
'-Wno-unused-parameter',
'-Werror=format',
'-Werror=format-security',
'-Werror=incompatible-pointer-types',
'-Werror=init-self',
'-Werror=int-conversion',
'-Werror=missing-declarations',
'-Werror=missing-prototypes',
'-Werror=pointer-arith',
'-Werror=undef',
'-Werror=vla',
'-Wsuggest-attribute=format',
'-Wwrite-strings',
]),
language: ['c'],
)
endif
sources = [
'src/av1.c',
'src/backend-common.c',
'src/export-buf.c',
'src/direct/direct-export-buf.c',
'src/direct/nv-driver.c',
'src/h264.c',
'src/hevc.c',
'src/jpeg.c',
'src/mpeg2.c',
'src/mpeg4.c',
'src/vabackend.c',
'src/vc1.c',
'src/vp8.c',
'src/list.c',
]
if gst_codecs_deps.found()
sources += ['src/vp9.c']
deps += [gst_codecs_deps]
endif
nvidia_incdir = include_directories('nvidia-include')
nvidia_install_dir = libva_deps.get_variable(pkgconfig: 'driverdir')
shared_library(
'nvidia_drv_video',
name_prefix: '',
sources: sources,
dependencies: deps,
include_directories: nvidia_incdir,
install: true,
install_dir: nvidia_install_dir,
gnu_symbol_visibility: 'hidden',
)
meson.add_devenv(environment({
'NVD_LOG': '1',
'LIBVA_DRIVER_NAME': 'nvidia',
'LIBVA_DRIVERS_PATH': meson.project_build_root(),
}))