forked from bus1/dbus-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
134 lines (105 loc) · 2.82 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#
# Global Project Setup
#
project(
'dbus-broker',
'c',
default_options: [
'c_std=c11',
],
license: 'Apache',
meson_version: '>=0.60.0',
version: '32',
)
cc = meson.get_compiler('c')
conf = configuration_data()
mod_pkgconfig = import('pkgconfig')
#
# Mandatory Dependencies
#
dep_cdvar = dependency('libcdvar-1')
dep_cini = dependency('libcini-1')
dep_clist = dependency('libclist-3')
dep_crbtree = dependency('libcrbtree-3')
dep_cshquote = dependency('libcshquote-1')
dep_cstdaux = dependency('libcstdaux-1')
dep_math = cc.find_library('m')
dep_thread = dependency('threads')
#
# Default CFLAGS
#
add_project_arguments(dep_cstdaux.get_variable('cflags').split(' '), language: 'c')
add_project_arguments('-DBINDIR="' + join_paths(get_option('prefix'), get_option('bindir')) + '"', language: 'c')
add_project_arguments('-DPACKAGE_VERSION=' + meson.project_version(), language: 'c')
#
# Config: apparmor
#
use_apparmor = get_option('apparmor')
if use_apparmor
dep_libapparmor = dependency('libapparmor', version: '>=3.0')
endif
#
# Config: audit
#
use_audit = get_option('audit')
if use_audit
dep_libaudit = dependency('audit', version: '>=3.0')
dep_libcapng = dependency('libcap-ng', version: '>=0.6')
endif
#
# Config: docs
#
use_docs = get_option('docs')
if use_docs
prog_rst2man = find_program('rst2man', 'rst2man.py')
endif
#
# Config: launcher
#
use_launcher = get_option('launcher')
if use_launcher
dep_expat = dependency('expat', version: '>=2.2')
dep_libsystemd = dependency('libsystemd', version: '>=230')
dep_systemd = dependency('systemd', version: '>=230')
add_project_arguments('-DSYSTEMUIDMAX=' + dep_systemd.get_variable('systemuidmax'), language: 'c')
conf.set('systemunitdir', dep_systemd.get_variable('systemdsystemunitdir'))
conf.set('userunitdir', dep_systemd.get_variable('systemduserunitdir'))
conf.set('catalogdir', dep_systemd.get_variable('catalogdir'))
endif
#
# Config: reference-test
#
use_reference_test = get_option('reference-test')
if use_reference_test
dep_dbus = dependency('dbus-1', version: '>=1.10')
endif
#
# Config: selinux
#
use_selinux = get_option('selinux')
if use_selinux
dep_libselinux = dependency('libselinux', version: '>=3.2')
endif
#
# Config: system-console-users
#
use_system_console_users = get_option('system-console-users')
acc_sysusers = ''
foreach user : use_system_console_users
acc_sysusers += '"' + user + '",'
endforeach
add_project_arguments('-DSYSTEM_CONSOLE_USERS=' + acc_sysusers, language: 'c')
#
# Global Parameters
#
conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
#
# Subdirs
#
subdir('src')
if use_docs
subdir('docs')
endif
if use_launcher
subdir('test/dbus')
endif