2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(pixman)
|
2023-06-13 15:33:46 +02:00
|
|
|
specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: pixman) # for the include path
|
|
|
|
specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: opengl) # for the include path
|
2020-08-26 08:22:58 +02:00
|
|
|
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(png)
|
|
|
|
system_ss.add(files(
|
2021-05-19 07:39:33 +02:00
|
|
|
'clipboard.c',
|
2019-07-16 21:21:02 +02:00
|
|
|
'console.c',
|
|
|
|
'cursor.c',
|
|
|
|
'input-keymap.c',
|
|
|
|
'input-legacy.c',
|
|
|
|
'input-barrier.c',
|
|
|
|
'input.c',
|
|
|
|
'kbd-state.c',
|
|
|
|
'keymaps.c',
|
|
|
|
'qemu-pixman.c',
|
2023-01-09 20:03:15 +01:00
|
|
|
'ui-hmp-cmds.c',
|
2023-01-09 20:03:13 +01:00
|
|
|
'ui-qmp-cmds.c',
|
2021-02-15 12:10:36 +01:00
|
|
|
'util.c',
|
2019-07-16 21:21:02 +02:00
|
|
|
))
|
2023-08-30 11:38:28 +02:00
|
|
|
system_ss.add(when: pixman, if_true: files('console-vc.c'), if_false: files('console-vc-stubs.c'))
|
2021-10-09 22:16:57 +02:00
|
|
|
if dbus_display
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(files('dbus-module.c'))
|
2021-10-09 22:16:57 +02:00
|
|
|
endif
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add([spice_headers, files('spice-module.c')])
|
|
|
|
system_ss.add(when: spice_protocol, if_true: files('vdagent.c'))
|
2019-07-16 21:21:02 +02:00
|
|
|
|
2023-11-03 09:17:48 +01:00
|
|
|
if host_os == 'linux'
|
2023-05-26 12:20:39 +02:00
|
|
|
system_ss.add(files('input-linux.c', 'udmabuf.c'))
|
|
|
|
endif
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(when: cocoa, if_true: files('cocoa.m'))
|
2019-07-16 21:21:02 +02: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 07:39:38 +02:00
|
|
|
'vnc-clipboard.c',
|
2019-07-16 21:21:02 +02:00
|
|
|
))
|
2022-05-10 18:19:32 +02:00
|
|
|
vnc_ss.add(zlib, jpeg, gnutls)
|
2020-02-06 15:48:52 +01:00
|
|
|
vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c'))
|
2023-08-30 11:38:34 +02:00
|
|
|
system_ss.add_all(when: [vnc, pixman], if_true: vnc_ss)
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(when: vnc, if_false: files('vnc-stubs.c'))
|
2019-07-16 21:21:02 +02:00
|
|
|
|
|
|
|
ui_modules = {}
|
|
|
|
|
2020-10-13 01:43:48 +02:00
|
|
|
if curses.found()
|
2019-07-16 21:21:02 +02:00
|
|
|
curses_ss = ss.source_set()
|
2020-08-30 17:45:07 +02:00
|
|
|
curses_ss.add(when: [curses, iconv], if_true: [files('curses.c'), pixman])
|
2019-07-16 21:21:02 +02:00
|
|
|
ui_modules += {'curses' : curses_ss}
|
|
|
|
endif
|
|
|
|
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(opengl)
|
2022-04-20 17:33:40 +02:00
|
|
|
if opengl.found()
|
2020-10-19 09:52:24 +02:00
|
|
|
opengl_ss = ss.source_set()
|
2023-08-30 11:38:33 +02:00
|
|
|
opengl_ss.add(gbm, pixman)
|
|
|
|
opengl_ss.add(when: [opengl],
|
2020-10-19 09:52:24 +02:00
|
|
|
if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
|
|
|
|
ui_modules += {'opengl' : opengl_ss}
|
|
|
|
endif
|
|
|
|
|
2023-06-06 13:56:49 +02:00
|
|
|
if opengl.found()
|
2020-10-19 09:52:23 +02:00
|
|
|
egl_headless_ss = ss.source_set()
|
2023-06-06 13:56:49 +02:00
|
|
|
egl_headless_ss.add(when: [opengl, pixman],
|
|
|
|
if_true: [files('egl-headless.c'), gbm])
|
2020-10-19 09:52:23 +02:00
|
|
|
ui_modules += {'egl-headless' : egl_headless_ss}
|
|
|
|
endif
|
|
|
|
|
2021-07-15 09:53:53 +02:00
|
|
|
if dbus_display
|
|
|
|
dbus_ss = ss.source_set()
|
2023-06-06 13:56:42 +02:00
|
|
|
env = environment()
|
2023-11-03 09:17:48 +01:00
|
|
|
env.set('HOST_OS', host_os)
|
2023-06-06 13:56:42 +02:00
|
|
|
xml = custom_target('dbus-display preprocess',
|
|
|
|
input: 'dbus-display1.xml',
|
|
|
|
output: 'dbus-display1.xml',
|
|
|
|
env: env,
|
|
|
|
command: [xml_pp, '@INPUT@', '@OUTPUT@'])
|
2021-07-15 09:53:53 +02:00
|
|
|
dbus_display1 = custom_target('dbus-display gdbus-codegen',
|
|
|
|
output: ['dbus-display1.h', 'dbus-display1.c'],
|
2023-06-06 13:56:42 +02:00
|
|
|
input: xml,
|
2022-04-20 17:33:44 +02:00
|
|
|
command: [gdbus_codegen, '@INPUT@',
|
2021-07-15 09:53:53 +02:00
|
|
|
'--glib-min-required', '2.64',
|
|
|
|
'--output-directory', meson.current_build_dir(),
|
|
|
|
'--interface-prefix', 'org.qemu.',
|
|
|
|
'--c-namespace', 'QemuDBus',
|
|
|
|
'--generate-c-code', '@BASENAME@'])
|
2024-03-19 10:25:02 +01:00
|
|
|
dbus_display1_dep = declare_dependency(sources: dbus_display1, dependencies: gio)
|
2023-08-30 11:38:37 +02:00
|
|
|
dbus_ss.add(when: [gio, dbus_display1_dep],
|
2021-07-15 09:53:53 +02:00
|
|
|
if_true: [files(
|
2021-07-22 17:43:29 +02:00
|
|
|
'dbus-chardev.c',
|
2021-07-20 14:02:52 +02:00
|
|
|
'dbus-clipboard.c',
|
2021-07-15 09:53:53 +02:00
|
|
|
'dbus-console.c',
|
|
|
|
'dbus-error.c',
|
|
|
|
'dbus-listener.c',
|
|
|
|
'dbus.c',
|
2023-08-30 11:38:37 +02:00
|
|
|
), opengl, gbm, pixman])
|
2021-07-15 09:53:53 +02:00
|
|
|
ui_modules += {'dbus' : dbus_ss}
|
|
|
|
endif
|
|
|
|
|
2021-01-07 14:02:29 +01:00
|
|
|
if gtk.found()
|
2023-11-03 09:17:48 +01:00
|
|
|
if host_os == 'windows'
|
2023-08-30 11:29:54 +02:00
|
|
|
system_ss.add(files('win32-kbd-hook.c'))
|
|
|
|
endif
|
2019-07-16 21:21:02 +02:00
|
|
|
|
|
|
|
gtk_ss = ss.source_set()
|
2022-11-21 14:55:38 +01:00
|
|
|
gtk_ss.add(gtk, vte, pixman, files('gtk.c'))
|
|
|
|
if have_gtk_clipboard
|
|
|
|
gtk_ss.add(files('gtk-clipboard.c'))
|
|
|
|
endif
|
2021-01-07 13:54:22 +01:00
|
|
|
gtk_ss.add(when: x11, if_true: files('x_keymap.c'))
|
2022-04-20 17:33:40 +02:00
|
|
|
gtk_ss.add(when: opengl, if_true: files('gtk-gl-area.c'))
|
|
|
|
gtk_ss.add(when: [x11, opengl], if_true: files('gtk-egl.c'))
|
2019-07-16 21:21:02 +02:00
|
|
|
ui_modules += {'gtk' : gtk_ss}
|
|
|
|
endif
|
|
|
|
|
2020-02-06 14:17:15 +01:00
|
|
|
if sdl.found()
|
2023-11-03 09:17:48 +01:00
|
|
|
if host_os == 'windows'
|
2023-08-30 11:29:54 +02:00
|
|
|
system_ss.add(files('win32-kbd-hook.c'))
|
|
|
|
endif
|
2019-07-16 21:21:02 +02:00
|
|
|
|
|
|
|
sdl_ss = ss.source_set()
|
2020-02-06 14:17:15 +01:00
|
|
|
sdl_ss.add(sdl, sdl_image, pixman, glib, files(
|
2019-07-16 21:21:02 +02:00
|
|
|
'sdl2-2d.c',
|
|
|
|
'sdl2-input.c',
|
|
|
|
'sdl2.c',
|
|
|
|
))
|
2022-04-20 17:33:40 +02:00
|
|
|
sdl_ss.add(when: opengl, if_true: files('sdl2-gl.c'))
|
2021-01-07 13:54:22 +01:00
|
|
|
sdl_ss.add(when: x11, if_true: files('x_keymap.c'))
|
2019-07-16 21:21:02 +02:00
|
|
|
ui_modules += {'sdl' : sdl_ss}
|
|
|
|
endif
|
|
|
|
|
2021-10-07 15:08:23 +02:00
|
|
|
if spice.found()
|
2020-10-19 09:52:22 +02: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}
|
|
|
|
|
2023-08-30 11:38:35 +02:00
|
|
|
if gio.found()
|
|
|
|
spice_ss = ss.source_set()
|
|
|
|
spice_ss.add(spice, gio, pixman, files('spice-app.c'))
|
|
|
|
ui_modules += {'spice-app': spice_ss}
|
|
|
|
endif
|
2019-07-16 21:21:02 +02:00
|
|
|
endif
|
|
|
|
|
2019-07-15 14:00:36 +02: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 17:24:29 +02:00
|
|
|
if have_system or xkbcommon.found()
|
2023-05-18 14:07:22 +02:00
|
|
|
keycodemapdb_proj = subproject('keycodemapdb', required: true)
|
2019-07-15 14:00:36 +02: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,
|
2023-05-18 14:07:22 +02:00
|
|
|
input: keycodemapdb_proj.get_variable('keymaps_csv'),
|
|
|
|
command: [python, keycodemapdb_proj.get_variable('keymap_gen').full_path(),
|
|
|
|
'code-map', '--lang', 'glib2',
|
2019-07-15 14:00:36 +02:00
|
|
|
'--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
|
2020-05-05 12:24:25 +02:00
|
|
|
'@INPUT0@', e[0], e[1]])
|
2019-07-15 14:00:36 +02:00
|
|
|
endforeach
|
|
|
|
endif
|
2019-07-15 15:36:47 +02:00
|
|
|
|
|
|
|
subdir('shader')
|
2019-07-16 21:21:02 +02:00
|
|
|
|
2020-10-15 22:18:40 +02:00
|
|
|
if have_system
|
|
|
|
subdir('icons')
|
|
|
|
|
2020-10-16 09:19:14 +02:00
|
|
|
install_data('qemu.desktop', install_dir: qemu_desktopdir)
|
2020-10-15 22:18:40 +02:00
|
|
|
endif
|
2020-08-26 15:06:20 +02:00
|
|
|
|
2019-07-16 21:21:02 +02:00
|
|
|
modules += {'ui': ui_modules}
|