]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/timesync/meson.build
meson: also allow setting GIT_VERSION via templates
[thirdparty/systemd.git] / src / timesync / meson.build
CommitLineData
db9ecf05 1# SPDX-License-Identifier: LGPL-2.1-or-later
3a726fcd 2
f5a5284e
YW
3sources = files(
4 'timesyncd-conf.c',
5 'timesyncd-conf.h',
6 'timesyncd-manager.c',
7 'timesyncd-manager.h',
8 'timesyncd-ntp-message.h',
9 'timesyncd-server.c',
10 'timesyncd-server.h')
11
12systemd_timesyncd_sources = files(
13 'timesyncd.c',
14 'timesyncd-bus.c',
15 'timesyncd-bus.h')
16
17sources += custom_target(
37efbbd8
ZJS
18 'timesyncd-gperf.c',
19 input : 'timesyncd-gperf.gperf',
20 output : 'timesyncd-gperf.c',
21 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
5c23128d 22
f5a5284e
YW
23if get_option('link-timesyncd-shared')
24 timesyncd_link_with = [libshared]
25else
26 timesyncd_link_with = [libsystemd_static,
27 libshared_static,
28 libbasic_gcrypt]
29endif
30
31libtimesyncd_core = static_library(
32 'timesyncd-core',
33 sources,
34 include_directories : includes,
03f7ddf0
ZJS
35 link_with : timesyncd_link_with,
36 build_by_default : false)
5c23128d 37
54e6c762
ZJS
38custom_target(
39 'timesyncd.conf',
40 input : 'timesyncd.conf.in',
41 output : 'timesyncd.conf',
8f04a1ca 42 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
54e6c762
ZJS
43 install : conf.get('ENABLE_TIMESYNCD') == 1 and install_sysconfdir_samples,
44 install_dir : pkgsysconfdir)
45
349cc4a5 46if conf.get('ENABLE_TIMESYNCD') == 1
e7dd3947
YW
47 install_data('org.freedesktop.timesync1.conf',
48 install_dir : dbuspolicydir)
49 install_data('org.freedesktop.timesync1.service',
50 install_dir : dbussystemservicedir)
e5ea741c
ZJS
51 install_data('80-systemd-timesync.list',
52 install_dir : ntpservicelistdir)
5c23128d 53endif
c6c1ba8f
ZJS
54
55############################################################
56
57tests += [
e1eeebbb 58 [files('test-timesync.c'),
f5a5284e
YW
59 [libtimesyncd_core,
60 libshared],
b09f0146 61 [libm]],
c6c1ba8f 62]