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