summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-01-22 09:11:36 -0500
committerGitHub <noreply@github.com>2019-01-22 09:11:36 -0500
commitf0353900aed11f72f2f100cca1fcb60d34fc1c06 (patch)
treee6433142b36331803ce874c970c14be55c3314cf /meson.build
parent2e330473eb3ab9653f52a183d26bc1ca2927da2a (diff)
parent667fea6a8f6121891de51eb04ce8dd03930fce1c (diff)
Merge pull request #22 from swaywm/meson-options
Add Meson feature options
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 6 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index f9d8196..c937e19 100644
--- a/meson.build
+++ b/meson.build
@@ -2,6 +2,7 @@ project(
'swaylock',
'c',
license: 'MIT',
+ meson_version: '>=0.48.0',
default_options: [
'c_std=c11',
'warning_level=2',
@@ -39,9 +40,9 @@ xkbcommon = dependency('xkbcommon')
cairo = dependency('cairo')
pango = dependency('pango')
pangocairo = dependency('pangocairo')
-gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: false)
-libpam = cc.find_library('pam', required: get_option('pam') == 'enabled')
-crypt = cc.find_library('crypt', required: false)
+gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: get_option('gdk-pixbuf'))
+libpam = cc.find_library('pam', required: get_option('pam'))
+crypt = cc.find_library('crypt', required: not libpam.found())
math = cc.find_library('m')
git = find_program('git', required: false)
@@ -139,16 +140,14 @@ sources = [
'unicode.c',
]
-if libpam.found() and get_option('pam') != 'disabled'
+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
+ dependencies += [crypt]
endif
swaylock_inc = include_directories('include')