aboutsummaryrefslogtreecommitdiff
path: root/swaylock/meson.build
blob: f3321a78c860277e6b16bb7619fce51186d3d3d9 (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
sysconfdir = get_option('sysconfdir')

dependencies = [
    cairo,
    client_protos,
    gdk_pixbuf,
    math,
    pango,
    pangocairo,
    xkbcommon,
    wayland_client,
    wlroots,
]

sources = [
    'main.c',
    'password.c',
    'render.c',
    'seat.c'
]

if libpam.found()
    sources += ['pam.c']
    dependencies += [libpam]
else
    warning('The swaylock binary must be setuid when compiled without libpam')
    warning('You must do this manually post-install: chmod a+s /path/to/swaylock')
    sources += ['shadow.c']
    if crypt.found()
        dependencies += [crypt]
    endif
endif

executable('swaylock',
    sources,
	include_directories: [sway_inc],
	dependencies: dependencies,
	link_with: [lib_sway_common, lib_sway_client],
	install_rpath : rpathdir,
	install: true
)

if is_freebsd
	install_data(
		'pam/swaylock.freebsd',
		install_dir: sysconfdir + '/pam.d/',
		rename: 'swaylock'
	)
else
	install_data(
		'pam/swaylock.linux',
		install_dir: sysconfdir + '/pam.d/',
		rename: 'swaylock'
	)
endif