1softmmu_ss.add(pixman) 2specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: pixman) # for the include path 3 4softmmu_ss.add(files( 5 'clipboard.c', 6 'console.c', 7 'cursor.c', 8 'input-keymap.c', 9 'input-legacy.c', 10 'input-barrier.c', 11 'input.c', 12 'kbd-state.c', 13 'keymaps.c', 14 'qemu-pixman.c', 15 'util.c', 16)) 17if dbus_display 18 softmmu_ss.add(files('dbus-module.c')) 19endif 20softmmu_ss.add([spice_headers, files('spice-module.c')]) 21softmmu_ss.add(when: spice_protocol, if_true: files('vdagent.c')) 22 23softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files( 24 'input-linux.c', 25 'udmabuf.c', 26)) 27softmmu_ss.add(when: cocoa, if_true: files('cocoa.m')) 28 29vnc_ss = ss.source_set() 30vnc_ss.add(files( 31 'vnc.c', 32 'vnc-enc-zlib.c', 33 'vnc-enc-hextile.c', 34 'vnc-enc-tight.c', 35 'vnc-palette.c', 36 'vnc-enc-zrle.c', 37 'vnc-auth-vencrypt.c', 38 'vnc-ws.c', 39 'vnc-jobs.c', 40 'vnc-clipboard.c', 41)) 42vnc_ss.add(zlib, png, jpeg, gnutls) 43vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c')) 44softmmu_ss.add_all(when: vnc, if_true: vnc_ss) 45softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c')) 46specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl) 47 48ui_modules = {} 49 50if curses.found() 51 curses_ss = ss.source_set() 52 curses_ss.add(when: [curses, iconv], if_true: [files('curses.c'), pixman]) 53 ui_modules += {'curses' : curses_ss} 54endif 55 56if config_host.has_key('CONFIG_OPENGL') 57 opengl_ss = ss.source_set() 58 opengl_ss.add(gbm) 59 opengl_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL'], 60 if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c')) 61 ui_modules += {'opengl' : opengl_ss} 62endif 63 64if config_host.has_key('CONFIG_OPENGL') and gbm.found() 65 egl_headless_ss = ss.source_set() 66 egl_headless_ss.add(when: [opengl, gbm, pixman, 'CONFIG_OPENGL'], 67 if_true: files('egl-headless.c')) 68 ui_modules += {'egl-headless' : egl_headless_ss} 69endif 70 71if dbus_display 72 dbus_ss = ss.source_set() 73 dbus_display1 = custom_target('dbus-display gdbus-codegen', 74 output: ['dbus-display1.h', 'dbus-display1.c'], 75 input: files('dbus-display1.xml'), 76 command: [config_host['GDBUS_CODEGEN'], 77 '@INPUT@', 78 '--glib-min-required', '2.64', 79 '--output-directory', meson.current_build_dir(), 80 '--interface-prefix', 'org.qemu.', 81 '--c-namespace', 'QemuDBus', 82 '--generate-c-code', '@BASENAME@']) 83 dbus_ss.add(when: [gio, pixman, opengl, 'CONFIG_GIO'], 84 if_true: [files( 85 'dbus-chardev.c', 86 'dbus-clipboard.c', 87 'dbus-console.c', 88 'dbus-error.c', 89 'dbus-listener.c', 90 'dbus.c', 91 ), dbus_display1]) 92 ui_modules += {'dbus' : dbus_ss} 93endif 94 95if gtk.found() 96 softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c')) 97 98 gtk_ss = ss.source_set() 99 gtk_ss.add(gtk, vte, pixman, files('gtk.c', 'gtk-clipboard.c')) 100 gtk_ss.add(when: x11, if_true: files('x_keymap.c')) 101 gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-gl-area.c')) 102 gtk_ss.add(when: [x11, opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c')) 103 ui_modules += {'gtk' : gtk_ss} 104endif 105 106if sdl.found() 107 softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c')) 108 109 sdl_ss = ss.source_set() 110 sdl_ss.add(sdl, sdl_image, pixman, glib, files( 111 'sdl2-2d.c', 112 'sdl2-input.c', 113 'sdl2.c', 114 )) 115 sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c')) 116 sdl_ss.add(when: x11, if_true: files('x_keymap.c')) 117 ui_modules += {'sdl' : sdl_ss} 118endif 119 120if spice.found() 121 spice_core_ss = ss.source_set() 122 spice_core_ss.add(spice, pixman, files( 123 'spice-core.c', 124 'spice-input.c', 125 'spice-display.c' 126 )) 127 ui_modules += {'spice-core' : spice_core_ss} 128endif 129 130if spice.found() and config_host.has_key('CONFIG_GIO') 131 spice_ss = ss.source_set() 132 spice_ss.add(spice, gio, pixman, files('spice-app.c')) 133 ui_modules += {'spice-app': spice_ss} 134endif 135 136keymaps = [ 137 ['atset1', 'qcode'], 138 ['linux', 'qcode'], 139 ['qcode', 'atset1'], 140 ['qcode', 'atset2'], 141 ['qcode', 'atset3'], 142 ['qcode', 'linux'], 143 ['qcode', 'qnum'], 144 ['qcode', 'sun'], 145 ['qnum', 'qcode'], 146 ['usb', 'qcode'], 147 ['win32', 'qcode'], 148 ['x11', 'qcode'], 149 ['xorgevdev', 'qcode'], 150 ['xorgkbd', 'qcode'], 151 ['xorgxquartz', 'qcode'], 152 ['xorgxwin', 'qcode'], 153 ['osx', 'qcode'], 154] 155 156if have_system or xkbcommon.found() 157 foreach e : keymaps 158 output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1]) 159 genh += custom_target(output, 160 output: output, 161 capture: true, 162 input: files('keycodemapdb/data/keymaps.csv'), 163 command: [python, files('keycodemapdb/tools/keymap-gen'), 164 'code-map', 165 '--lang', 'glib2', 166 '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]), 167 '@INPUT0@', e[0], e[1]]) 168 endforeach 169endif 170 171subdir('shader') 172 173if have_system 174 subdir('icons') 175 176 install_data('qemu.desktop', install_dir: qemu_desktopdir) 177endif 178 179modules += {'ui': ui_modules} 180