-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
75 lines (58 loc) · 1.47 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
project(
'uksmd',
'c',
version: '1.2.12',
license : 'GPLv3',
meson_version : '>= 1.1.0'
)
project_source_files = [
'uksmd.c'
]
project_dependencies = [
dependency('libproc2'),
dependency('libcap-ng'),
]
build_args = [
'-DPROJECT_NAME="' + meson.project_name() + '"',
'-DPROJECT_VERSION="' + meson.project_version() + '"',
]
i18n = import('i18n')
systemd = dependency('systemd', required: get_option('systemd'))
gettext_package = 'uksmdstats'
if systemd.found()
systemd_system_unit_dir = systemd.get_variable(pkgconfig : 'systemdsystemunitdir')
install_data('uksmd.service', install_dir: systemd_system_unit_dir)
project_dependencies += [
dependency('libsystemd')
]
build_args += [
'-DHAVE_SYSTEMD',
]
endif
libalpm = dependency('libalpm', required: get_option('libalpm'))
if libalpm.found() and systemd.found()
install_data('uksmd-systemd-restart', install_dir: '/usr/share/libalpm/scripts')
install_data('90-uksmd-upgrade.hook', install_dir: '/usr/share/libalpm/hooks')
project_dependencies += [
dependency('libsystemd', 'libalpm')
]
build_args += [
'-DHAVE_SYSTEMD',
]
endif
install_data('uksmdstats', install_dir: '/usr/bin')
install_data(
[
'COPYING',
],
rename : 'LICENSE',
install_dir : get_option('datadir') / 'licenses' / 'uksmd'
)
subdir('locale')
project_target = executable(
meson.project_name(),
project_source_files,
dependencies: project_dependencies,
install : true,
c_args : build_args,
)