summaryrefslogtreecommitdiff
path: root/daemon/meson.build
blob: 72c7c3c12d4cfba3da148243425be71bec7bf49f (plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# D-Bus interfaces
display_dbus_gen = gnome.gdbus_codegen('gdm-display-glue',
  'gdm-display.xml',
  namespace: 'GdmDBus',
  interface_prefix: 'org.gnome.DisplayManager',
  autocleanup: 'all',
)
local_display_dbus_gen = gnome.gdbus_codegen('gdm-local-display-glue',
  'gdm-local-display.xml',
  namespace: 'GdmDBus',
  interface_prefix: 'org.gnome.DisplayManager',
  autocleanup: 'all',
)
local_display_factory_dbus_gen = gnome.gdbus_codegen('gdm-local-display-factory-glue',
  'gdm-local-display-factory.xml',
  namespace: 'GdmDBus',
  interface_prefix: 'org.gnome.DisplayManager',
  autocleanup: 'all',
)
manager_dbus_gen = gnome.gdbus_codegen('gdm-manager-glue',
  'gdm-manager.xml',
  namespace: 'GdmDBus',
  interface_prefix: 'org.gnome.DisplayManager',
  autocleanup: 'all',
)
session_dbus_gen = gnome.gdbus_codegen('gdm-session-glue',
  'gdm-session.xml',
  namespace: 'GdmDBus',
  interface_prefix: 'org.gnome.DisplayManager',
  autocleanup: 'all',
)
session_worker_dbus_gen = gnome.gdbus_codegen('gdm-session-worker-glue',
  'gdm-session-worker.xml',
  namespace: 'GdmDBus',
  interface_prefix: 'org.gnome.DisplayManager',
  autocleanup: 'all',
)

gdm_session_enums = gnome.mkenums('gdm-session-enum-types',
  h_template: 'gdm-session-enum-types.h.in',
  c_template: 'gdm-session-enum-types.c.in',
  sources: 'gdm-session.h',
)
gdm_session_worker_enums = gnome.mkenums('gdm-session-worker-enum-types',
  h_template: 'gdm-session-worker-enum-types.h.in',
  c_template: 'gdm-session-worker-enum-types.c.in',
  sources: 'gdm-session-worker.h',
)

# Daemons deps
gdm_daemon_deps = [
  libgdmcommon_dep,
  accountsservice_dep,
  gobject_dep,
  gio_dep,
  gio_unix_dep,
  libpam_dep,
  x_deps,
  xcb_dep,
]

if xdmcp_dep.found() and get_option('tcp-wrappers')
  gdm_daemon_deps += libwrap_dep
endif

# test-session-client
test_session_client_src = [
  'test-session-client.c',
  session_dbus_gen,
  manager_dbus_gen,
]

test_session_client = executable('test-session-client',
  test_session_client_src,
  dependencies: gdm_daemon_deps,
  include_directories: config_h_dir,
)

# Session worker
gdm_session_worker_src = [
  'session-worker-main.c',
  'gdm-session.c',
  'gdm-session-settings.c',
  'gdm-session-auditor.c',
  'gdm-session-record.c',
  'gdm-session-worker.c',
  'gdm-session-worker-job.c',
  'gdm-session-worker-common.c',
  'gdm-dbus-util.c',
  session_dbus_gen,
  session_worker_dbus_gen,
  gdm_session_enums,
  gdm_session_worker_enums,
]

gdm_session_worker_deps = [
  gdm_daemon_deps,
]

gdm_session_worker_includes = [
  config_h_dir,
]

if pam_extensions_supported
  gdm_session_worker_src += '../pam-extensions/gdm-pam-extensions.h'
  gdm_session_worker_includes += pam_extensions_inc
endif

if libaudit_dep.found()
  gdm_session_worker_deps += libaudit_dep

  gdm_session_worker_src += [
    'gdm-session-linux-auditor.c',
  ]
endif

if have_adt
  gdm_session_worker_src += 'gdm-session-solaris-auditor.c'
endif

gdm_session_worker = executable('gdm-session-worker',
  gdm_session_worker_src,
  dependencies: gdm_session_worker_deps,
  include_directories: gdm_session_worker_includes,
  install: true,
  install_dir: get_option('libexecdir'),
)

# Wayland session
gdm_wayland_session_src = [
  'gdm-wayland-session.c',
  manager_dbus_gen,
]

gdm_wayland_session = executable('gdm-wayland-session',
  gdm_wayland_session_src,
  dependencies: gdm_daemon_deps,
  include_directories: gdm_session_worker_includes,
  install: true,
  install_dir: get_option('libexecdir'),
)

# X session
gdm_x_session_src = [
  'gdm-x-session.c',
  manager_dbus_gen,
]

gdm_x_session = executable('gdm-x-session',
  gdm_x_session_src,
  dependencies: gdm_daemon_deps,
  include_directories: gdm_session_worker_includes,
  install: true,
  install_dir: get_option('libexecdir'),
)

# GDM daemon
gdm_daemon_sources = files(
  'gdm-dbus-util.c',
  'gdm-display-access-file.c',
  'gdm-display-factory.c',
  'gdm-display-store.c',
  'gdm-display.c',
  'gdm-launch-environment.c',
  'gdm-legacy-display.c',
  'gdm-local-display-factory.c',
  'gdm-local-display.c',
  'gdm-manager.c',
  'gdm-server.c',
  'gdm-session-record.c',
  'gdm-session-worker-common.c',
  'gdm-session-worker-job.c',
  'gdm-session.c',
  'main.c',
)

gdm_daemon_gen_sources = [
  display_dbus_gen,
  local_display_factory_dbus_gen,
  manager_dbus_gen,
  local_display_dbus_gen,
  session_dbus_gen,
  session_worker_dbus_gen,
  gdm_session_enums,
]

if xdmcp_dep.found()
  gdm_daemon_deps += xdmcp_dep

  gdm_daemon_sources = [
    gdm_daemon_sources,
    files(
      'gdm-xdmcp-display-factory.c',
      'gdm-xdmcp-display.c',
      'gdm-xdmcp-chooser-display.c',
    ),
  ]
endif

gdm_daemon = executable('gdm',
  [ gdm_daemon_sources, gdm_daemon_gen_sources ],
  dependencies: gdm_daemon_deps,
  include_directories: config_h_dir,
  install: true,
  install_dir: get_option('sbindir')
)