summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-13 19:37:14 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-23 21:47:28 -0400
commit1eeb43f5afed1405402f37a2546d1e923030c487 (patch)
tree516641d5532a9ac269cb19ff0eab976708dfd314
parent005a29f23423782660703cdc6b9330b5fc9eeff2 (diff)
downloadsystemd-1eeb43f5afed1405402f37a2546d1e923030c487.tar.gz
meson: libxkbcommon support
-rw-r--r--meson.build21
-rw-r--r--meson_options.txt2
2 files changed, 22 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 15808e6447..ec1ab11700 100644
--- a/meson.build
+++ b/meson.build
@@ -856,6 +856,18 @@ else
libgio = []
endif
+want_xkbcommon = get_option('xkbcommon')
+if want_xkbcommon != 'no'
+ libxkbcommon = dependency('xkbcommon',
+ version : '>= 0.3.0',
+ required : want_xkbcommon == 'yes')
+ if libxkbcommon.found()
+ conf.set('HAVE_XKBCOMMON', 1)
+ endif
+else
+ libxkbcommon = []
+endif
+
want_dbus = get_option('dbus')
if want_dbus != 'no'
libdbus = dependency('dbus-1',
@@ -1493,12 +1505,19 @@ if conf.get('ENABLE_HOSTNAMED', 0) == 1
endif
if conf.get('ENABLE_LOCALED', 0) == 1
+ if conf.get('HAVE_XKBCOMMON', 0) == 1
+ # logind will load libxkbcommon.so dynamically on its own
+ deps = [libdl]
+ else
+ deps = []
+ endif
+
executable('systemd-localed',
systemd_localed_sources,
include_directories : includes,
link_with : [libshared,
libsystemd_internal],
- dependencies : [libdl],
+ dependencies : deps,
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
diff --git a/meson_options.txt b/meson_options.txt
index d5ce9d9f93..59e38515da 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -200,6 +200,8 @@ option('xz', type : 'combo', choices : ['auto', 'yes', 'no'],
description : 'xz compression support')
option('lz4', type : 'combo', choices : ['auto', 'yes', 'no'],
description : 'lz4 compression support')
+option('xkbcommon', type : 'combo', choices : ['auto', 'yes', 'no'],
+ description : 'xkbcommon keymap support')
option('glib', type : 'combo', choices : ['auto', 'yes', 'no'],
description : 'libglib support (for tests only)')
option('dbus', type : 'combo', choices : ['auto', 'yes', 'no'],