2 specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: pixman) # for the include path
17 softmmu_ss.add([spice_headers, files('spice-module.c')])
18 softmmu_ss.add(when: spice_protocol, if_true: files('vdagent.c'))
20 softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c'))
21 softmmu_ss.add(when: cocoa, if_true: files('cocoa.m'))
23 vnc_ss = ss.source_set()
31 'vnc-auth-vencrypt.c',
36 vnc_ss.add(zlib, png, jpeg, gnutls)
37 vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c'))
38 softmmu_ss.add_all(when: vnc, if_true: vnc_ss)
39 softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c'))
40 specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl)
45 curses_ss = ss.source_set()
46 curses_ss.add(when: [curses, iconv], if_true: [files('curses.c'), pixman])
47 ui_modules += {'curses' : curses_ss}
50 if config_host.has_key('CONFIG_OPENGL')
51 opengl_ss = ss.source_set()
53 opengl_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL'],
54 if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
55 ui_modules += {'opengl' : opengl_ss}
58 if config_host.has_key('CONFIG_OPENGL') and gbm.found()
59 egl_headless_ss = ss.source_set()
60 egl_headless_ss.add(when: [opengl, gbm, pixman, 'CONFIG_OPENGL'],
61 if_true: files('egl-headless.c'))
62 ui_modules += {'egl-headless' : egl_headless_ss}
66 softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
68 gtk_ss = ss.source_set()
69 gtk_ss.add(gtk, vte, pixman, files('gtk.c', 'gtk-clipboard.c'))
70 gtk_ss.add(when: x11, if_true: files('x_keymap.c'))
71 gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-gl-area.c'))
72 gtk_ss.add(when: [x11, opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c'))
73 ui_modules += {'gtk' : gtk_ss}
77 softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
79 sdl_ss = ss.source_set()
80 sdl_ss.add(sdl, sdl_image, pixman, glib, files(
85 sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c'))
86 sdl_ss.add(when: x11, if_true: files('x_keymap.c'))
87 ui_modules += {'sdl' : sdl_ss}
90 if config_host.has_key('CONFIG_SPICE')
91 spice_core_ss = ss.source_set()
92 spice_core_ss.add(spice, pixman, files(
97 ui_modules += {'spice-core' : spice_core_ss}
100 if config_host.has_key('CONFIG_SPICE') and config_host.has_key('CONFIG_GIO')
101 spice_ss = ss.source_set()
102 spice_ss.add(spice, gio, pixman, files('spice-app.c'))
103 ui_modules += {'spice-app': spice_ss}
106 keymap_gen = find_program('keycodemapdb/tools/keymap-gen')
121 ['xorgevdev', 'qcode'],
122 ['xorgkbd', 'qcode'],
123 ['xorgxquartz', 'qcode'],
124 ['xorgxwin', 'qcode'],
128 if have_system or xkbcommon.found()
130 output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1])
131 genh += custom_target(output,
134 input: files('keycodemapdb/data/keymaps.csv'),
135 command: [python.full_path(), files('keycodemapdb/tools/keymap-gen'),
138 '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
139 '@INPUT0@', e[0], e[1]])
148 install_data('qemu.desktop', install_dir: qemu_desktopdir)
151 modules += {'ui': ui_modules}