blob: 75958fe6b22b9171992db2646f848ee9bfbae538 [file] [log] [blame]
Artem Senicheve8837d52020-06-07 11:59:04 +03001# Rules for building with Meson
2
3project(
4 'hostlogger',
5 'cpp',
6 default_options: [
7 'warning_level=3',
8 'werror=true',
9 'cpp_std=c++17',
10 ],
11 license: 'Apache-2.0',
12)
13
14# version info from git
15version = vcs_tag(command: [ 'git', 'describe', '--always', '--dirty', '--long' ],
16 input: 'src/version.hpp.in',
17 output: 'version.hpp')
18
19# unit tests
20build_tests = get_option('tests')
21subdir('test')
22
23# install systemd unit template file
24systemd = dependency('systemd')
25systemd_system_unit_dir = systemd.get_pkgconfig_variable(
26 'systemdsystemunitdir',
27 define_variable: ['prefix', get_option('prefix')],
28)
29configure_file(
30 copy: true,
31 input: 'hostlogger@.service',
32 install: true,
33 install_dir: systemd_system_unit_dir,
34 output: 'hostlogger@.service'
35)
36
37executable(
38 'hostlogger',
39 [
40 version,
41 'src/config.cpp',
42 'src/dbus_loop.cpp',
43 'src/file_storage.cpp',
44 'src/host_console.cpp',
45 'src/log_buffer.cpp',
46 'src/main.cpp',
47 'src/service.cpp',
48 'src/zlib_exception.cpp',
49 'src/zlib_file.cpp',
50 ],
51 dependencies: [
52 systemd,
53 dependency('phosphor-logging'),
54 dependency('zlib'),
55 ],
56 install: true
57)