@@ -38,19 +38,29 @@ if meson.is_cross_build() or 'CONFIG_XKBCOMMON' not in config_host
else
native_qemu_keymap = qemu_keymap
endif
+
t = []
foreach km, args: keymaps
- t += custom_target(km,
- build_by_default: true,
- output: km,
- command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
- install_dir: qemu_datadir / 'keymaps')
+ if native_qemu_keymap.found()
+ # generate with qemu-kvm
+ t += custom_target(km,
+ build_by_default: true,
+ output: km,
+ command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
+ install_dir: qemu_datadir / 'keymaps')
+ else
+ # copy from source tree
+ t += custom_target(km,
+ build_by_default: true,
+ input: km,
+ output: km,
+ command: ['cp', '@INPUT@', '@OUTPUT@'],
+ install_dir: qemu_datadir / 'keymaps')
+ endif
endforeach
-if t.length() > 0
+
+if native_qemu_keymap.found()
alias_target('update-keymaps', t)
-else
- # install from the source tree
- install_data(keymaps.keys(), install_dir: qemu_datadir / 'keymaps')
endif
install_data(['sl', 'sv'], install_dir: qemu_datadir / 'keymaps')