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