diff options
| author | emersion <contact@emersion.fr> | 2018-09-28 14:17:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-28 14:17:37 +0200 |
| commit | 1698260533ea71791d07cfc9d0efab08fb893450 (patch) | |
| tree | f1dcfbd0a59ce356f7d4cec1d076358e0d00e387 /swaylock/meson.build | |
| parent | 813de9f7ac674ad276b01df0f0fac39a7ba8fbdd (diff) | |
| parent | c9773491207d36d6f5e651adcb7a64c7a015bba3 (diff) | |
Merge pull request #2720 from swaywm/swaylock-shadow
Add support for building swaylock without PAM
Diffstat (limited to 'swaylock/meson.build')
| -rw-r--r-- | swaylock/meson.build | 50 |
1 files changed, 31 insertions, 19 deletions
diff --git a/swaylock/meson.build b/swaylock/meson.build index 675b8c69..6c87d173 100644 --- a/swaylock/meson.build +++ b/swaylock/meson.build @@ -1,25 +1,37 @@ sysconfdir = get_option('sysconfdir') -executable( - 'swaylock', [ - 'main.c', - 'password.c', - 'render.c', - 'seat.c' - ], +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'] +endif + +executable('swaylock', + sources, include_directories: [sway_inc], - dependencies: [ - cairo, - client_protos, - gdk_pixbuf, - libpam, - math, - pango, - pangocairo, - xkbcommon, - wayland_client, - wlroots, - ], + dependencies: dependencies, link_with: [lib_sway_common, lib_sway_client], install: true ) |
