1softmmu_ss.add(pixman) 2specific_ss.add(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)) 15 16softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c')) 17softmmu_ss.add(when: 'CONFIG_SPICE', if_true: files('spice-core.c', 'spice-input.c', 'spice-display.c')) 18softmmu_ss.add(when: [cocoa, 'CONFIG_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) 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')) 36softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c')) 37softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL_DMABUF'], if_true: files('egl-headless.c')) 38 39ui_modules = {} 40 41if config_host.has_key('CONFIG_CURSES') 42 curses_ss = ss.source_set() 43 curses_ss.add(when: [curses, iconv], if_true: files('curses.c')) 44 ui_modules += {'curses' : curses_ss} 45endif 46 47if config_host.has_key('CONFIG_GTK') 48 softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c')) 49 50 gtk_ss = ss.source_set() 51 gtk_ss.add(gtk, vte, files('gtk.c')) 52 gtk_ss.add(when: [x11, 'CONFIG_X11'], if_true: files('x_keymap.c')) 53 gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c')) 54 gtk_ss.add(when: [opengl, 'CONFIG_GTK_GL'], if_true: files('gtk-gl-area.c')) 55 ui_modules += {'gtk' : gtk_ss} 56endif 57 58if sdl.found() 59 softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c')) 60 61 sdl_ss = ss.source_set() 62 sdl_ss.add(sdl, sdl_image, pixman, glib, files( 63 'sdl2-2d.c', 64 'sdl2-input.c', 65 'sdl2.c', 66 )) 67 sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c')) 68 sdl_ss.add(when: [x11, 'CONFIG_X11'], if_true: files('x_keymap.c')) 69 ui_modules += {'sdl' : sdl_ss} 70endif 71 72if config_host.has_key('CONFIG_SPICE') and config_host.has_key('CONFIG_GIO') 73 spice_ss = ss.source_set() 74 spice_ss.add(spice, gio, files('spice-app.c')) 75 ui_modules += {'spice-app': spice_ss} 76endif 77 78keymap_gen = find_program('keycodemapdb/tools/keymap-gen') 79 80keymaps = [ 81 ['atset1', 'qcode'], 82 ['linux', 'qcode'], 83 ['qcode', 'atset1'], 84 ['qcode', 'atset2'], 85 ['qcode', 'atset3'], 86 ['qcode', 'linux'], 87 ['qcode', 'qnum'], 88 ['qcode', 'sun'], 89 ['qnum', 'qcode'], 90 ['usb', 'qcode'], 91 ['win32', 'qcode'], 92 ['x11', 'qcode'], 93 ['xorgevdev', 'qcode'], 94 ['xorgkbd', 'qcode'], 95 ['xorgxquartz', 'qcode'], 96 ['xorgxwin', 'qcode'], 97 ['osx', 'qcode'], 98] 99 100if have_system or xkbcommon.found() 101 foreach e : keymaps 102 output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1]) 103 genh += custom_target(output, 104 output: output, 105 capture: true, 106 input: files('keycodemapdb/data/keymaps.csv'), 107 command: [python.full_path(), files('keycodemapdb/tools/keymap-gen'), 108 '--lang', 'glib2', 109 '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]), 110 'code-map', '@INPUT0@', e[0], e[1]]) 111 endforeach 112endif 113 114subdir('shader') 115 116modules += {'ui': ui_modules} 117