-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
70 lines (64 loc) · 1.51 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
project(
'sd-inhibit-bridge',
'c',
version: '0.1.1',
default_options: [
'warning_level=3',
'c_std=c2x',
],
)
add_project_arguments([
'-D_DEFAULT_SOURCE',
'-Wno-pedantic',
'-Wno-error=unused-function',
'-Wno-error=unused-parameter',
'-Wno-error=unused-but-set-parameter',
'-Wno-error=unused-but-set-variable',
'-Wno-error=unused-variable',
'-Wno-error=unused-value',
'-Wno-error=unused-label',
'-Wno-error=unused-const-variable',
'-Wno-error=unused-result',
# HACK: stop vscode's intellisense from complaining about missing c2x features
'-include', meson.source_root() / 'c2xcompat.h',
'-include', meson.source_root() / 'extensions.h',
], language: 'c')
DEP_SYSTEMD = dependency(
'systemd',
include_type: 'system',
required: false,
)
if get_option('sd-bus-provider') == 'auto'
DEP_LIBSYSTEMD = dependency(
['libsystemd', 'libelogind'],
include_type: 'system',
required: true,
)
else
DEP_LIBSYSTEMD = dependency(
get_option('sd-bus-provider'),
include_type: 'system',
required: true,
)
endif
docdir = get_option('docdir')
if docdir == ''
docdir = join_paths(
get_option('prefix'),
get_option('datadir'),
'doc',
meson.project_name(),
)
endif
install_data('README.md', install_dir: docdir)
licensedir = get_option('licensedir')
if licensedir == ''
licensedir = join_paths(
get_option('prefix'),
get_option('datadir'),
'licenses',
meson.project_name(),
)
endif
install_data('LICENSE', install_dir: licensedir)
subdir('src')