]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/login/meson.build
Merge pull request #29586 from poettering/read-stripped-line
[thirdparty/systemd.git] / src / login / meson.build
CommitLineData
db9ecf05 1# SPDX-License-Identifier: LGPL-2.1-or-later
3a726fcd 2
f1b98127
ZJS
3systemd_logind_sources = files(
4 'logind.c',
2f492a73 5)
5c23128d
ZJS
6
7logind_gperf_c = custom_target(
37efbbd8
ZJS
8 'logind_gperf.c',
9 input : 'logind-gperf.gperf',
10 output : 'logind-gperf.c',
11 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
5c23128d 12
f1b98127
ZJS
13liblogind_core_sources = files(
14 'logind-action.c',
f1b98127 15 'logind-brightness.c',
f1b98127 16 'logind-button.c',
f1b98127
ZJS
17 'logind-core.c',
18 'logind-dbus.c',
f1b98127 19 'logind-device.c',
f1b98127 20 'logind-inhibit.c',
f1b98127 21 'logind-polkit.c',
f1b98127 22 'logind-seat-dbus.c',
f1b98127 23 'logind-seat.c',
f1b98127 24 'logind-session-dbus.c',
f1b98127 25 'logind-session-device.c',
f1b98127 26 'logind-session.c',
f1b98127 27 'logind-user-dbus.c',
f1b98127 28 'logind-user.c',
53c0397b 29 'logind-wall.c',
2f492a73 30)
5c23128d 31
ae98d374
ZJS
32liblogind_core_sources += [logind_gperf_c]
33
5c23128d 34liblogind_core = static_library(
37efbbd8
ZJS
35 'logind-core',
36 liblogind_core_sources,
37 include_directories : includes,
92148283
JJ
38 dependencies : [libacl,
39 userspace],
03f7ddf0 40 build_by_default : false)
5c23128d 41
f1b98127
ZJS
42loginctl_sources = files(
43 'loginctl.c',
2f492a73
ZJS
44 'sysfs-show.c',
45)
5c23128d 46
b8ed1bf8
YW
47executables += [
48 libexec_template + {
49 'name' : 'systemd-logind',
50 'dbus' : true,
51 'conditions' : ['ENABLE_LOGIND'],
52 'sources' : systemd_logind_sources,
53 'link_with' : [
54 liblogind_core,
55 libshared,
56 ],
57 'dependencies' : [
58 libacl,
59 threads,
60 ],
61 },
62 executable_template + {
63 'name' : 'loginctl',
64 'public' : true,
65 'conditions' : ['ENABLE_LOGIND'],
66 'sources' : loginctl_sources,
67 'dependencies' : [
68 liblz4,
69 libxz,
70 libzstd,
71 threads,
72 ],
73 },
74 executable_template + {
75 'name' : 'systemd-inhibit',
76 'public' : true,
77 'conditions' : ['ENABLE_LOGIND'],
78 'sources' : files('inhibit.c'),
79 },
80 libexec_template + {
81 'name' : 'systemd-user-runtime-dir',
82 'conditions' : ['ENABLE_LOGIND'],
83 'sources' : files('user-runtime-dir.c'),
84 },
130c87b1
YW
85 test_template + {
86 'sources' : files('test-inhibit.c'),
87 'type' : 'manual',
88 },
89 test_template + {
90 'sources' : files('test-login-tables.c'),
91 'link_with' : [
92 liblogind_core,
93 libshared,
94 ],
95 'dependencies' : threads,
96 },
97 test_template + {
98 'sources' : files('test-session-properties.c'),
99 'type' : 'manual',
100 },
b8ed1bf8 101]
a9f0f5e5 102
130c87b1
YW
103simple_tests += files(
104 'test-login-shared.c'
105)
106
b8ed1bf8
YW
107modules += [
108 pam_template + {
109 'name' : 'pam_systemd',
110 'conditions' : [
111 'ENABLE_LOGIND',
112 'HAVE_PAM',
113 ],
114 'sources' : files('pam_systemd.c'),
90461ef5 115 'version-script' : meson.current_source_dir() / 'pam_systemd.sym',
b8ed1bf8
YW
116 },
117]
1ccbb359 118
c900d89f 119enable_logind = conf.get('ENABLE_LOGIND') == 1
155078c8
ZJS
120
121custom_target(
122 'logind.conf',
123 input : 'logind.conf.in',
124 output : 'logind.conf',
125 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
126 install : enable_logind and install_sysconfdir_samples and pkgsysconfdir != 'no',
6495361c 127 install_dir : pkgconfigfiledir)
155078c8
ZJS
128
129custom_target(
130 'systemd-user',
131 input : 'systemd-user.in',
132 output : 'systemd-user',
133 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
134 install : enable_logind and pamconfdir != 'no',
135 install_dir : pamconfdir)
5c23128d 136
c900d89f 137if enable_logind
37efbbd8
ZJS
138 install_data('org.freedesktop.login1.conf',
139 install_dir : dbuspolicydir)
140 install_data('org.freedesktop.login1.service',
141 install_dir : dbussystemservicedir)
9b3cff19 142 install_data('org.freedesktop.login1.policy',
264d8dcc 143 install_dir : polkitpolicydir)
5c23128d 144endif