qemu/ui/meson.build

152 lines
4.2 KiB
Meson
Raw Normal View History

softmmu_ss.add(pixman)
specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: pixman) # for the include path
softmmu_ss.add(files(
'clipboard.c',
'console.c',
'cursor.c',
'input-keymap.c',
'input-legacy.c',
'input-barrier.c',
'input.c',
'kbd-state.c',
'keymaps.c',
'qemu-pixman.c',
'udmabuf.c',
))
softmmu_ss.add([spice_headers, files('spice-module.c')])
softmmu_ss.add(when: spice_protocol, if_true: files('vdagent.c'))
softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c'))
softmmu_ss.add(when: cocoa, if_true: files('cocoa.m'))
vnc_ss = ss.source_set()
vnc_ss.add(files(
'vnc.c',
'vnc-enc-zlib.c',
'vnc-enc-hextile.c',
'vnc-enc-tight.c',
'vnc-palette.c',
'vnc-enc-zrle.c',
'vnc-auth-vencrypt.c',
'vnc-ws.c',
'vnc-jobs.c',
'vnc-clipboard.c',
))
vnc_ss.add(zlib, png, jpeg, gnutls)
vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c'))
softmmu_ss.add_all(when: vnc, if_true: vnc_ss)
softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c'))
specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl)
ui_modules = {}
if curses.found()
curses_ss = ss.source_set()
curses_ss.add(when: [curses, iconv], if_true: [files('curses.c'), pixman])
ui_modules += {'curses' : curses_ss}
endif
if config_host.has_key('CONFIG_OPENGL')
opengl_ss = ss.source_set()
opengl_ss.add(gbm)
opengl_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL'],
if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
ui_modules += {'opengl' : opengl_ss}
endif
if config_host.has_key('CONFIG_OPENGL') and gbm.found()
egl_headless_ss = ss.source_set()
egl_headless_ss.add(when: [opengl, gbm, pixman, 'CONFIG_OPENGL'],
if_true: files('egl-headless.c'))
ui_modules += {'egl-headless' : egl_headless_ss}
endif
if gtk.found()
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
gtk_ss = ss.source_set()
gtk_ss.add(gtk, vte, pixman, files('gtk.c', 'gtk-clipboard.c'))
gtk_ss.add(when: x11, if_true: files('x_keymap.c'))
gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-gl-area.c'))
gtk_ss.add(when: [x11, opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c'))
ui_modules += {'gtk' : gtk_ss}
endif
if sdl.found()
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
sdl_ss = ss.source_set()
sdl_ss.add(sdl, sdl_image, pixman, glib, files(
'sdl2-2d.c',
'sdl2-input.c',
'sdl2.c',
))
sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c'))
sdl_ss.add(when: x11, if_true: files('x_keymap.c'))
ui_modules += {'sdl' : sdl_ss}
endif
if config_host.has_key('CONFIG_SPICE')
spice_core_ss = ss.source_set()
spice_core_ss.add(spice, pixman, files(
'spice-core.c',
'spice-input.c',
'spice-display.c'
))
ui_modules += {'spice-core' : spice_core_ss}
endif
if config_host.has_key('CONFIG_SPICE') and config_host.has_key('CONFIG_GIO')
spice_ss = ss.source_set()
spice_ss.add(spice, gio, pixman, files('spice-app.c'))
ui_modules += {'spice-app': spice_ss}
endif
keymap_gen = find_program('keycodemapdb/tools/keymap-gen')
keymaps = [
['atset1', 'qcode'],
['linux', 'qcode'],
['qcode', 'atset1'],
['qcode', 'atset2'],
['qcode', 'atset3'],
['qcode', 'linux'],
['qcode', 'qnum'],
['qcode', 'sun'],
['qnum', 'qcode'],
['usb', 'qcode'],
['win32', 'qcode'],
['x11', 'qcode'],
['xorgevdev', 'qcode'],
['xorgkbd', 'qcode'],
['xorgxquartz', 'qcode'],
['xorgxwin', 'qcode'],
['osx', 'qcode'],
]
if have_system or xkbcommon.found()
foreach e : keymaps
output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1])
genh += custom_target(output,
output: output,
capture: true,
input: files('keycodemapdb/data/keymaps.csv'),
command: [python.full_path(), files('keycodemapdb/tools/keymap-gen'),
ui: update keycodemapdb submodule commit Primarily this is to pull in a fix for Win32 keycodes. The other useful change is the removal of build timestamp from generated files which is desirable for reproducable builds. The make rules need updating due to slightly changed CLI syntax - more args must now come after the command name. 6119e6e19a050df847418de7babe5166779955e4 Fix scan codes for Korean keys 685684a8404301780714e8a89a871981e7cae988 Fix argument order in output headers b3774853042c951b200d767697285781cc59a83c Add HTML entries for Korean layout keys 8e54850d800e4697a2798fb82ac740e760f8530b Add macOS entries for Japanese keyboards 27acf0ef828bf719b2053ba398b195829413dbdd Fix win32 keycode for VK_OEM_102 317d3eeb963a515e15a63fa356d8ebcda7041a51 Add support for generating RST formatted docs pages 7381b9bfadd31c4c9e9a10b5bb5032f9189d4352 Introduce separate args for title & subtitle with docs generator 6280c94f306df6a20bbc100ba15a5a81af0366e6 keymap-gen: Name sections in pod output df4e56f8fab65ba714ec18f4e7338a966a1620ad Add an empty meson project 16e5b0787687d8904dad2c026107409eb9bfcb95 remove buildtime from generated files 044f21dd0d4f62519aae9f1d53a026407a0b664f add header file generators 7779876a6b06755e3bb2c94ee3ded50635bcb0fa c++: add extern declaration to the generated file 0e0a317889464397d6f1ae03aad0d2ca593aab04 move CLanguageGenerator closer to CLanguageGenerator itself Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-05-05 18:24:25 +08:00
'code-map',
'--lang', 'glib2',
'--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
ui: update keycodemapdb submodule commit Primarily this is to pull in a fix for Win32 keycodes. The other useful change is the removal of build timestamp from generated files which is desirable for reproducable builds. The make rules need updating due to slightly changed CLI syntax - more args must now come after the command name. 6119e6e19a050df847418de7babe5166779955e4 Fix scan codes for Korean keys 685684a8404301780714e8a89a871981e7cae988 Fix argument order in output headers b3774853042c951b200d767697285781cc59a83c Add HTML entries for Korean layout keys 8e54850d800e4697a2798fb82ac740e760f8530b Add macOS entries for Japanese keyboards 27acf0ef828bf719b2053ba398b195829413dbdd Fix win32 keycode for VK_OEM_102 317d3eeb963a515e15a63fa356d8ebcda7041a51 Add support for generating RST formatted docs pages 7381b9bfadd31c4c9e9a10b5bb5032f9189d4352 Introduce separate args for title & subtitle with docs generator 6280c94f306df6a20bbc100ba15a5a81af0366e6 keymap-gen: Name sections in pod output df4e56f8fab65ba714ec18f4e7338a966a1620ad Add an empty meson project 16e5b0787687d8904dad2c026107409eb9bfcb95 remove buildtime from generated files 044f21dd0d4f62519aae9f1d53a026407a0b664f add header file generators 7779876a6b06755e3bb2c94ee3ded50635bcb0fa c++: add extern declaration to the generated file 0e0a317889464397d6f1ae03aad0d2ca593aab04 move CLanguageGenerator closer to CLanguageGenerator itself Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-05-05 18:24:25 +08:00
'@INPUT0@', e[0], e[1]])
endforeach
endif
subdir('shader')
if have_system
subdir('icons')
install_data('qemu.desktop', install_dir: qemu_desktopdir)
endif
modules += {'ui': ui_modules}