diff mbox series

[PULL,3/3] meson: avoid compiling qemu-keymap by default

Message ID 20200825062008.6502-4-kraxel@redhat.com
State New, archived
Headers show
Series [PULL,1/3] meson: drop keymaps symlink | expand

Commit Message

Gerd Hoffmann Aug. 25, 2020, 6:20 a.m. UTC
From: Laurent Vivier <laurent@vivier.eu>

qemu-keymap is not needed with linux-user, so disable it by default if
tools and system are disabled (tools are disabled by default with linux-user).

Avoid this error with statically linked binaries:

    Linking target qemu-keymap
    /usr/bin/ld: cannot find -lxkbcommon

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-id: 20200824152430.1844159-3-laurent@vivier.eu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
 meson.build | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series


diff --git a/meson.build b/meson.build
index f6e346af1a69..f0fe5f8799e0 100644
--- a/meson.build
+++ b/meson.build
@@ -1063,6 +1063,11 @@  if 'CONFIG_GUEST_AGENT' in config_host
+# Don't build qemu-keymap if xkbcommon is not explicitly enabled
+# when we don't build tools or system
+if get_option('xkbcommon').auto() and not have_system and not have_tools
+  xkbcommon = not_found
 if xkbcommon.found()
   # used for the update-keymaps target, so include rules even if !have_tools
   qemu_keymap = executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c') + genh,