diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/meson.build b/meson.build index 76eaff20..1e7ce281 100644 --- a/meson.build +++ b/meson.build | |||
@@ -42,7 +42,6 @@ pango = dependency('pango') | |||
42 | pangocairo = dependency('pangocairo') | 42 | pangocairo = dependency('pangocairo') |
43 | gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: false) | 43 | gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: false) |
44 | pixman = dependency('pixman-1') | 44 | pixman = dependency('pixman-1') |
45 | libcap = dependency('libcap', required: false) | ||
46 | libinput = dependency('libinput', version: '>=1.6.0') | 45 | libinput = dependency('libinput', version: '>=1.6.0') |
47 | libpam = cc.find_library('pam', required: false) | 46 | libpam = cc.find_library('pam', required: false) |
48 | systemd = dependency('libsystemd', required: false) | 47 | systemd = dependency('libsystemd', required: false) |
@@ -74,6 +73,11 @@ if elogind.found() | |||
74 | swayidle_deps += elogind | 73 | swayidle_deps += elogind |
75 | endif | 74 | endif |
76 | 75 | ||
76 | if not systemd.found() and not elogind.found() | ||
77 | warning('The sway binary must be setuid when compiled without (e)logind') | ||
78 | warning('You must do this manually post-install: chmod a+s /path/to/sway') | ||
79 | endif | ||
80 | |||
77 | scdoc = find_program('scdoc', required: false) | 81 | scdoc = find_program('scdoc', required: false) |
78 | 82 | ||
79 | if scdoc.found() | 83 | if scdoc.found() |
@@ -124,7 +128,16 @@ else | |||
124 | endif | 128 | endif |
125 | add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c') | 129 | add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c') |
126 | 130 | ||
127 | add_project_arguments('-D_LD_LIBRARY_PATH="@0@"'.format(get_option('ld-library-path')), language: 'c') | 131 | if get_option('use_rpath') |
132 | if get_option('custom_rpath') == '' | ||
133 | # default to platform specific libdir, one level up from the binary | ||
134 | rpathdir = join_paths('$ORIGIN', '..', '$LIB') | ||
135 | else | ||
136 | rpathdir = get_option('custom_rpath') | ||
137 | endif | ||
138 | else | ||
139 | rpathdir = '' | ||
140 | endif | ||
128 | 141 | ||
129 | sway_inc = include_directories('include') | 142 | sway_inc = include_directories('include') |
130 | 143 | ||
@@ -139,10 +152,7 @@ subdir('swaybg') | |||
139 | subdir('swaybar') | 152 | subdir('swaybar') |
140 | subdir('swayidle') | 153 | subdir('swayidle') |
141 | subdir('swaynag') | 154 | subdir('swaynag') |
142 | 155 | subdir('swaylock') | |
143 | if libpam.found() | ||
144 | subdir('swaylock') | ||
145 | endif | ||
146 | 156 | ||
147 | config = configuration_data() | 157 | config = configuration_data() |
148 | config.set('sysconfdir', join_paths(prefix, sysconfdir)) | 158 | config.set('sysconfdir', join_paths(prefix, sysconfdir)) |