-
Notifications
You must be signed in to change notification settings - Fork 4
/
meson.build
106 lines (83 loc) · 2.46 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
project('gtuber', 'c',
version: '0.4.0',
meson_version: '>=0.56.0',
license: 'LGPL-2.1-or-later',
default_options: [
'warning_level=1',
'buildtype=debugoptimized',
],
)
glib_req = '>=2.68'
gnome = import('gnome')
pkgconfig = import('pkgconfig')
prefix = get_option('prefix')
bindir = get_option('bindir')
datadir = get_option('datadir')
libdir = get_option('libdir')
includedir = get_option('includedir')
cc = meson.get_compiler('c')
add_global_arguments(
'-DG_LOG_USE_STRUCTURED=1',
language: 'c',
)
gtuber_version = meson.project_version().split('-')[0]
version_array = gtuber_version.split('.')
gtuber_version_suffix = '-' + version_array[0] + '.0'
gtuber_api_name = meson.project_name() + gtuber_version_suffix
gtuber_plugin_devel_api_name = '@0@-plugin-devel@1@'.format(
meson.project_name(), gtuber_version_suffix
)
gtuber_utils_prefix = meson.project_name() + '-utils-'
gtuber_plugin_prefix = meson.project_name() + '-'
gtuber_plugins_libdir = join_paths(prefix, libdir, gtuber_api_name)
warning_flags = [
'-Wmissing-declarations',
'-Wredundant-decls',
'-Wwrite-strings',
'-Wformat',
'-Wformat-security',
'-Winit-self',
'-Wmissing-include-dirs',
'-Waddress',
'-Wno-multichar',
'-Wvla',
'-Wpointer-arith',
'-Wmissing-prototypes',
'-Wdeclaration-after-statement',
'-Wold-style-definition',
]
foreach extra_arg : warning_flags
if cc.has_argument (extra_arg)
add_project_arguments([extra_arg], language: 'c')
endif
endforeach
cdata = configuration_data()
cdata.set('PACKAGE', '"@0@"'.format(meson.project_name()))
cdata.set('VERSION', '"@0@"'.format(meson.project_version()))
cdata.set('PACKAGE_VERSION', '"@0@"'.format(meson.project_version()))
cdata.set('GTUBER_API_NAME', '"@0@"'.format(gtuber_api_name))
cdata.set('GTUBER_PLUGIN_PATH', '"@0@"'.format(gtuber_plugins_libdir))
cdata.set('GST_PACKAGE_NAME', '"gst-plugin-gtuber"')
cdata.set('GST_PACKAGE_ORIGIN', '"https://github.com/Rafostar/gtuber"')
cdata.set('GST_LICENSE', '"LGPL"')
configure_file(
output: 'config.h',
configuration: cdata,
)
summary({
'prefix': prefix,
'bindir': bindir,
'datadir': datadir,
'libdir': libdir,
'includedir': includedir,
}, section: 'Directories')
subdir('gtuber')
summary('introspection', build_gir ? 'Yes' : 'No', section: 'Build')
summary('vapi', build_vapi ? 'Yes' : 'No', section: 'Build')
subdir('doc')
summary('doc', build_doc, section: 'Build')
subdir('utils')
subdir('gst')
subdir('bin')
subdir('plugins')
subdir('tests')