]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/timesync/meson.build
Merge pull request #29586 from poettering/read-stripped-line
[thirdparty/systemd.git] / src / timesync / meson.build
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 sources = files(
4 'timesyncd-conf.c',
5 'timesyncd-manager.c',
6 'timesyncd-server.c',
7 )
8
9 systemd_timesyncd_sources = files(
10 'timesyncd.c',
11 'timesyncd-bus.c',
12 )
13
14 sources += custom_target(
15 'timesyncd-gperf.c',
16 input : 'timesyncd-gperf.gperf',
17 output : 'timesyncd-gperf.c',
18 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
19
20 if get_option('link-timesyncd-shared')
21 timesyncd_link_with = [libshared]
22 else
23 timesyncd_link_with = [libsystemd_static,
24 libshared_static,
25 libbasic_gcrypt]
26 endif
27
28 libtimesyncd_core = static_library(
29 'timesyncd-core',
30 sources,
31 include_directories : includes,
32 dependencies : userspace,
33 link_with : timesyncd_link_with,
34 build_by_default : false)
35
36 executables += [
37 libexec_template + {
38 'name' : 'systemd-timesyncd',
39 'conditions' : ['ENABLE_TIMESYNCD'],
40 'sources' : systemd_timesyncd_sources,
41 'link_with' : libtimesyncd_core,
42 'dependencies' : [
43 libm,
44 threads,
45 ],
46 },
47 libexec_template + {
48 'name' : 'systemd-time-wait-sync',
49 'conditions' : ['ENABLE_TIMESYNCD'],
50 'sources' : files('wait-sync.c'),
51 'link_with' : libtimesyncd_core,
52 },
53 test_template + {
54 'sources' : files('test-timesync.c'),
55 'link_with' : [
56 libshared,
57 libtimesyncd_core,
58 ],
59 'dependencies' : libm,
60 },
61 ]
62
63 custom_target(
64 'timesyncd.conf',
65 input : 'timesyncd.conf.in',
66 output : 'timesyncd.conf',
67 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
68 install : conf.get('ENABLE_TIMESYNCD') == 1 and install_sysconfdir_samples,
69 install_dir : pkgconfigfiledir)
70
71 if conf.get('ENABLE_TIMESYNCD') == 1
72 install_data('org.freedesktop.timesync1.conf',
73 install_dir : dbuspolicydir)
74 install_data('org.freedesktop.timesync1.service',
75 install_dir : dbussystemservicedir)
76 install_data('80-systemd-timesync.list',
77 install_dir : ntpservicelistdir)
78 install_data('org.freedesktop.timesync1.policy',
79 install_dir : polkitpolicydir)
80 endif