-
Notifications
You must be signed in to change notification settings - Fork 34
/
meson.build
65 lines (58 loc) · 1.67 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
project('microdnf', 'c',
version : '3.10.1',
license : 'GPL-2.0+',
default_options : [
'b_asneeded=True',
'b_lundef=True',
'c_std=gnu11',
'warning_level=1',
],
meson_version : '>=0.36.0')
cc = meson.get_compiler('c')
test_cflags = [
'-fstrict-aliasing',
'-Wformat=2',
'-Wunused',
'-Wuninitialized',
'-Wstrict-prototypes',
'-Wmissing-prototypes',
'-Werror=implicit',
'-Werror=init-self',
'-Werror=main',
]
foreach cflag : test_cflags
if cc.has_argument(cflag)
add_project_arguments(cflag, language : 'c')
endif
endforeach
gnome = import('gnome')
glib = dependency('glib-2.0', version : '>=2.44.0')
gobject = dependency('gobject-2.0', version : '>=2.44.0')
libpeas = dependency('libpeas-1.0', version : '>=1.20.0')
libdnf = dependency('libdnf', version : '>=0.62.0')
scols = dependency('smartcols')
pkg_libdir = join_paths(get_option('prefix'), get_option('libdir'), 'dnf')
pkg_datadir = join_paths(get_option('prefix'), get_option('datadir'), 'dnf')
add_project_arguments(
'-DPACKAGE_LIBDIR="@0@"'.format(pkg_libdir),
'-DPACKAGE_DATADIR="@0@"'.format(pkg_datadir),
language : 'c',
)
subdir('dnf')
help2man = find_program('help2man', required: true)
if help2man.found()
help2man_opts = [
'--version-string=' + meson.project_version(),
'--no-info',
'--section=8',
'--name=Micro DNF',
]
custom_target('microdnf.8',
output: 'microdnf.8',
command: [
help2man, help2man_opts, '--output=@OUTPUT@', microdnf
],
install: true,
install_dir: get_option('mandir') + '/man8',
)
endif