2020-08-26 06:22:58 +00:00
|
|
|
softmmu_ss.add(pixman)
|
2020-09-01 10:15:41 +00:00
|
|
|
specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: pixman) # for the include path
|
2020-08-26 06:22:58 +00:00
|
|
|
|
2019-07-16 19:21:02 +00:00
|
|
|
softmmu_ss.add(files(
|
2021-05-19 05:39:33 +00:00
|
|
|
'clipboard.c',
|
2019-07-16 19:21:02 +00:00
|
|
|
'console.c',
|
|
|
|
'cursor.c',
|
|
|
|
'input-keymap.c',
|
|
|
|
'input-legacy.c',
|
|
|
|
'input-barrier.c',
|
|
|
|
'input.c',
|
|
|
|
'kbd-state.c',
|
|
|
|
'keymaps.c',
|
|
|
|
'qemu-pixman.c',
|
2021-02-15 11:10:36 +00:00
|
|
|
'util.c',
|
2019-07-16 19:21:02 +00:00
|
|
|
))
|
2021-10-09 20:16:57 +00:00
|
|
|
if dbus_display
|
|
|
|
softmmu_ss.add(files('dbus-module.c'))
|
|
|
|
endif
|
2020-10-19 07:52:11 +00:00
|
|
|
softmmu_ss.add([spice_headers, files('spice-module.c')])
|
2021-05-19 05:39:35 +00:00
|
|
|
softmmu_ss.add(when: spice_protocol, if_true: files('vdagent.c'))
|
2019-07-16 19:21:02 +00:00
|
|
|
|
2021-08-23 10:04:54 +00:00
|
|
|
softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files(
|
|
|
|
'input-linux.c',
|
|
|
|
'udmabuf.c',
|
|
|
|
))
|
2020-09-01 15:28:59 +00:00
|
|
|
softmmu_ss.add(when: cocoa, if_true: files('cocoa.m'))
|
2019-07-16 19:21:02 +00:00
|
|
|
|
|
|
|
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',
|
2021-05-19 05:39:38 +00:00
|
|
|
'vnc-clipboard.c',
|
2019-07-16 19:21:02 +00:00
|
|
|
))
|
2021-01-02 12:52:13 +00:00
|
|
|
vnc_ss.add(zlib, png, jpeg, gnutls)
|
2020-02-06 14:48:52 +00:00
|
|
|
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'))
|
2020-09-01 10:15:41 +00:00
|
|
|
specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl)
|
2019-07-16 19:21:02 +00:00
|
|
|
|
|
|
|
ui_modules = {}
|
|
|
|
|
2020-10-12 23:43:48 +00:00
|
|
|
if curses.found()
|
2019-07-16 19:21:02 +00:00
|
|
|
curses_ss = ss.source_set()
|
2020-08-30 15:45:07 +00:00
|
|
|
curses_ss.add(when: [curses, iconv], if_true: [files('curses.c'), pixman])
|
2019-07-16 19:21:02 +00:00
|
|
|
ui_modules += {'curses' : curses_ss}
|
|
|
|
endif
|
|
|
|
|
2020-10-19 07:52:24 +00:00
|
|
|
if config_host.has_key('CONFIG_OPENGL')
|
|
|
|
opengl_ss = ss.source_set()
|
2021-02-23 06:03:07 +00:00
|
|
|
opengl_ss.add(gbm)
|
2020-10-19 07:52:24 +00:00
|
|
|
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
|
|
|
|
|
2021-02-23 06:03:07 +00:00
|
|
|
if config_host.has_key('CONFIG_OPENGL') and gbm.found()
|
2020-10-19 07:52:23 +00:00
|
|
|
egl_headless_ss = ss.source_set()
|
2021-02-23 06:03:07 +00:00
|
|
|
egl_headless_ss.add(when: [opengl, gbm, pixman, 'CONFIG_OPENGL'],
|
2020-10-19 07:52:23 +00:00
|
|
|
if_true: files('egl-headless.c'))
|
|
|
|
ui_modules += {'egl-headless' : egl_headless_ss}
|
|
|
|
endif
|
|
|
|
|
2021-07-15 07:53:53 +00:00
|
|
|
if dbus_display
|
|
|
|
dbus_ss = ss.source_set()
|
|
|
|
dbus_display1 = custom_target('dbus-display gdbus-codegen',
|
|
|
|
output: ['dbus-display1.h', 'dbus-display1.c'],
|
|
|
|
input: files('dbus-display1.xml'),
|
|
|
|
command: [config_host['GDBUS_CODEGEN'],
|
|
|
|
'@INPUT@',
|
|
|
|
'--glib-min-required', '2.64',
|
|
|
|
'--output-directory', meson.current_build_dir(),
|
|
|
|
'--interface-prefix', 'org.qemu.',
|
|
|
|
'--c-namespace', 'QemuDBus',
|
|
|
|
'--generate-c-code', '@BASENAME@'])
|
|
|
|
dbus_ss.add(when: [gio, pixman, opengl, 'CONFIG_GIO'],
|
|
|
|
if_true: [files(
|
2021-07-20 12:02:52 +00:00
|
|
|
'dbus-clipboard.c',
|
2021-07-15 07:53:53 +00:00
|
|
|
'dbus-console.c',
|
|
|
|
'dbus-error.c',
|
|
|
|
'dbus-listener.c',
|
|
|
|
'dbus.c',
|
|
|
|
), dbus_display1])
|
|
|
|
ui_modules += {'dbus' : dbus_ss}
|
|
|
|
endif
|
|
|
|
|
2021-01-07 13:02:29 +00:00
|
|
|
if gtk.found()
|
2019-07-16 19:21:02 +00:00
|
|
|
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
|
|
|
|
|
|
|
|
gtk_ss = ss.source_set()
|
2021-05-19 05:39:40 +00:00
|
|
|
gtk_ss.add(gtk, vte, pixman, files('gtk.c', 'gtk-clipboard.c'))
|
2021-01-07 12:54:22 +00:00
|
|
|
gtk_ss.add(when: x11, if_true: files('x_keymap.c'))
|
2021-02-23 06:03:07 +00:00
|
|
|
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'))
|
2019-07-16 19:21:02 +00:00
|
|
|
ui_modules += {'gtk' : gtk_ss}
|
|
|
|
endif
|
|
|
|
|
2020-02-06 13:17:15 +00:00
|
|
|
if sdl.found()
|
2019-07-16 19:21:02 +00:00
|
|
|
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
|
|
|
|
|
|
|
|
sdl_ss = ss.source_set()
|
2020-02-06 13:17:15 +00:00
|
|
|
sdl_ss.add(sdl, sdl_image, pixman, glib, files(
|
2019-07-16 19:21:02 +00:00
|
|
|
'sdl2-2d.c',
|
|
|
|
'sdl2-input.c',
|
|
|
|
'sdl2.c',
|
|
|
|
))
|
|
|
|
sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c'))
|
2021-01-07 12:54:22 +00:00
|
|
|
sdl_ss.add(when: x11, if_true: files('x_keymap.c'))
|
2019-07-16 19:21:02 +00:00
|
|
|
ui_modules += {'sdl' : sdl_ss}
|
|
|
|
endif
|
|
|
|
|
2021-10-07 13:08:23 +00:00
|
|
|
if spice.found()
|
2020-10-19 07:52:22 +00:00
|
|
|
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
|
|
|
|
|
2021-10-07 13:08:23 +00:00
|
|
|
if spice.found() and config_host.has_key('CONFIG_GIO')
|
2019-07-16 19:21:02 +00:00
|
|
|
spice_ss = ss.source_set()
|
2020-08-30 15:45:07 +00:00
|
|
|
spice_ss.add(spice, gio, pixman, files('spice-app.c'))
|
2019-07-16 19:21:02 +00:00
|
|
|
ui_modules += {'spice-app': spice_ss}
|
|
|
|
endif
|
|
|
|
|
2019-07-15 12:00:36 +00: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 15:24:29 +00:00
|
|
|
if have_system or xkbcommon.found()
|
2019-07-15 12:00:36 +00: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'),
|
2021-09-08 10:13:14 +00:00
|
|
|
command: [python, files('keycodemapdb/tools/keymap-gen'),
|
2020-05-05 10:24:25 +00:00
|
|
|
'code-map',
|
2019-07-15 12:00:36 +00:00
|
|
|
'--lang', 'glib2',
|
|
|
|
'--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
|
2020-05-05 10:24:25 +00:00
|
|
|
'@INPUT0@', e[0], e[1]])
|
2019-07-15 12:00:36 +00:00
|
|
|
endforeach
|
|
|
|
endif
|
2019-07-15 13:36:47 +00:00
|
|
|
|
|
|
|
subdir('shader')
|
2019-07-16 19:21:02 +00:00
|
|
|
|
2020-10-15 20:18:40 +00:00
|
|
|
if have_system
|
|
|
|
subdir('icons')
|
|
|
|
|
2020-10-16 07:19:14 +00:00
|
|
|
install_data('qemu.desktop', install_dir: qemu_desktopdir)
|
2020-10-15 20:18:40 +00:00
|
|
|
endif
|
2020-08-26 13:06:20 +00:00
|
|
|
|
2019-07-16 19:21:02 +00:00
|
|
|
modules += {'ui': ui_modules}
|