2020-08-26 14:22:58 +08:00
|
|
|
softmmu_ss.add(pixman)
|
|
|
|
specific_ss.add(pixman) # for the include path
|
|
|
|
|
2019-07-17 03:21:02 +08:00
|
|
|
softmmu_ss.add(files(
|
|
|
|
'console.c',
|
|
|
|
'cursor.c',
|
|
|
|
'input-keymap.c',
|
|
|
|
'input-legacy.c',
|
|
|
|
'input-barrier.c',
|
|
|
|
'input.c',
|
|
|
|
'kbd-state.c',
|
|
|
|
'keymaps.c',
|
|
|
|
'qemu-pixman.c',
|
|
|
|
))
|
|
|
|
|
|
|
|
softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c'))
|
|
|
|
softmmu_ss.add(when: 'CONFIG_SPICE', if_true: files('spice-core.c', 'spice-input.c', 'spice-display.c'))
|
|
|
|
softmmu_ss.add(when: [cocoa, 'CONFIG_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',
|
|
|
|
))
|
2020-02-06 22:48:52 +08:00
|
|
|
vnc_ss.add(zlib, png, jpeg)
|
|
|
|
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'))
|
2019-07-17 03:21:02 +08:00
|
|
|
softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
|
|
|
|
softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL_DMABUF'], if_true: files('egl-headless.c'))
|
|
|
|
|
|
|
|
ui_modules = {}
|
|
|
|
|
|
|
|
if config_host.has_key('CONFIG_CURSES')
|
|
|
|
curses_ss = ss.source_set()
|
2020-08-30 23:45:07 +08:00
|
|
|
curses_ss.add(when: [curses, iconv], if_true: [files('curses.c'), pixman])
|
2019-07-17 03:21:02 +08:00
|
|
|
ui_modules += {'curses' : curses_ss}
|
|
|
|
endif
|
|
|
|
|
2020-08-26 06:23:10 +08:00
|
|
|
if config_host.has_key('CONFIG_GTK')
|
2019-07-17 03:21:02 +08:00
|
|
|
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
|
|
|
|
|
|
|
|
gtk_ss = ss.source_set()
|
2020-08-30 23:45:07 +08:00
|
|
|
gtk_ss.add(gtk, vte, pixman, files('gtk.c'))
|
2019-07-17 03:21:02 +08:00
|
|
|
gtk_ss.add(when: [x11, 'CONFIG_X11'], if_true: files('x_keymap.c'))
|
|
|
|
gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c'))
|
|
|
|
gtk_ss.add(when: [opengl, 'CONFIG_GTK_GL'], if_true: files('gtk-gl-area.c'))
|
|
|
|
ui_modules += {'gtk' : gtk_ss}
|
|
|
|
endif
|
|
|
|
|
2020-02-06 21:17:15 +08:00
|
|
|
if sdl.found()
|
2019-07-17 03:21:02 +08:00
|
|
|
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
|
|
|
|
|
|
|
|
sdl_ss = ss.source_set()
|
2020-02-06 21:17:15 +08:00
|
|
|
sdl_ss.add(sdl, sdl_image, pixman, glib, files(
|
2019-07-17 03:21:02 +08:00
|
|
|
'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, 'CONFIG_X11'], if_true: files('x_keymap.c'))
|
|
|
|
ui_modules += {'sdl' : sdl_ss}
|
|
|
|
endif
|
|
|
|
|
|
|
|
if config_host.has_key('CONFIG_SPICE') and config_host.has_key('CONFIG_GIO')
|
|
|
|
spice_ss = ss.source_set()
|
2020-08-30 23:45:07 +08:00
|
|
|
spice_ss.add(spice, gio, pixman, files('spice-app.c'))
|
2019-07-17 03:21:02 +08:00
|
|
|
ui_modules += {'spice-app': spice_ss}
|
|
|
|
endif
|
|
|
|
|
|
|
|
keymap_gen = find_program('keycodemapdb/tools/keymap-gen')
|
|
|
|
|
2019-07-15 20:00:36 +08:00
|
|
|
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'],
|
|
|
|
]
|
|
|
|
|
2020-08-24 23:24:29 +08:00
|
|
|
if have_system or xkbcommon.found()
|
2019-07-15 20:00:36 +08:00
|
|
|
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'),
|
|
|
|
'--lang', 'glib2',
|
|
|
|
'--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
|
|
|
|
'code-map', '@INPUT0@', e[0], e[1]])
|
|
|
|
endforeach
|
|
|
|
endif
|
2019-07-15 21:36:47 +08:00
|
|
|
|
|
|
|
subdir('shader')
|
2020-08-26 21:06:19 +08:00
|
|
|
subdir('icons')
|
2019-07-17 03:21:02 +08:00
|
|
|
|
2020-08-26 21:06:20 +08:00
|
|
|
install_data('qemu.desktop', install_dir: config_host['qemu_desktopdir'])
|
|
|
|
|
2019-07-17 03:21:02 +08:00
|
|
|
modules += {'ui': ui_modules}
|