2 specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: pixman) # for the include path
3 specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: opengl) # for the include path
21 system_ss.add(when: pixman, if_true: files('console-vc.c'), if_false: files('console-vc-stubs.c'))
23 system_ss.add(files('dbus-module.c'))
25 system_ss.add([spice_headers, files('spice-module.c')])
26 system_ss.add(when: spice_protocol, if_true: files('vdagent.c'))
29 system_ss.add(files('input-linux.c', 'udmabuf.c'))
31 system_ss.add(when: cocoa, if_true: files('cocoa.m'))
33 vnc_ss = ss.source_set()
41 'vnc-auth-vencrypt.c',
46 vnc_ss.add(zlib, jpeg, gnutls)
47 vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c'))
48 system_ss.add_all(when: [vnc, pixman], if_true: vnc_ss)
49 system_ss.add(when: vnc, if_false: files('vnc-stubs.c'))
54 curses_ss = ss.source_set()
55 curses_ss.add(when: [curses, iconv], if_true: [files('curses.c'), pixman])
56 ui_modules += {'curses' : curses_ss}
61 opengl_ss = ss.source_set()
62 opengl_ss.add(gbm, pixman)
63 opengl_ss.add(when: [opengl],
64 if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
65 ui_modules += {'opengl' : opengl_ss}
69 egl_headless_ss = ss.source_set()
70 egl_headless_ss.add(when: [opengl, pixman],
71 if_true: [files('egl-headless.c'), gbm])
72 ui_modules += {'egl-headless' : egl_headless_ss}
76 dbus_ss = ss.source_set()
78 env.set('HOST_OS', host_os)
79 xml = custom_target('dbus-display preprocess',
80 input: 'dbus-display1.xml',
81 output: 'dbus-display1.xml',
83 command: [xml_pp, '@INPUT@', '@OUTPUT@'])
84 dbus_display1 = custom_target('dbus-display gdbus-codegen',
85 output: ['dbus-display1.h', 'dbus-display1.c'],
87 command: [gdbus_codegen, '@INPUT@',
88 '--glib-min-required', '2.64',
89 '--output-directory', meson.current_build_dir(),
90 '--interface-prefix', 'org.qemu.',
91 '--c-namespace', 'QemuDBus',
92 '--generate-c-code', '@BASENAME@'])
93 dbus_display1_dep = declare_dependency(sources: dbus_display1, dependencies: gio)
94 dbus_ss.add(when: [gio, dbus_display1_dep],
102 ), opengl, gbm, pixman])
103 ui_modules += {'dbus' : dbus_ss}
107 if host_os == 'windows'
108 system_ss.add(files('win32-kbd-hook.c'))
111 gtk_ss = ss.source_set()
112 gtk_ss.add(gtk, vte, pixman, files('gtk.c'))
113 if have_gtk_clipboard
114 gtk_ss.add(files('gtk-clipboard.c'))
116 gtk_ss.add(when: x11, if_true: files('x_keymap.c'))
117 gtk_ss.add(when: opengl, if_true: files('gtk-gl-area.c'))
118 gtk_ss.add(when: [x11, opengl], if_true: files('gtk-egl.c'))
119 ui_modules += {'gtk' : gtk_ss}
123 if host_os == 'windows'
124 system_ss.add(files('win32-kbd-hook.c'))
127 sdl_ss = ss.source_set()
128 sdl_ss.add(sdl, sdl_image, pixman, glib, files(
133 sdl_ss.add(when: opengl, if_true: files('sdl2-gl.c'))
134 sdl_ss.add(when: x11, if_true: files('x_keymap.c'))
135 ui_modules += {'sdl' : sdl_ss}
139 spice_core_ss = ss.source_set()
140 spice_core_ss.add(spice, pixman, files(
145 ui_modules += {'spice-core' : spice_core_ss}
148 spice_ss = ss.source_set()
149 spice_ss.add(spice, gio, pixman, files('spice-app.c'))
150 ui_modules += {'spice-app': spice_ss}
167 ['xorgevdev', 'qcode'],
168 ['xorgkbd', 'qcode'],
169 ['xorgxquartz', 'qcode'],
170 ['xorgxwin', 'qcode'],
174 if have_system or xkbcommon.found()
175 keycodemapdb_proj = subproject('keycodemapdb', required: true)
177 output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1])
178 genh += custom_target(output,
181 input: keycodemapdb_proj.get_variable('keymaps_csv'),
182 command: [python, keycodemapdb_proj.get_variable('keymap_gen').full_path(),
183 'code-map', '--lang', 'glib2',
184 '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
185 '@INPUT0@', e[0], e[1]])
194 install_data('qemu.desktop', install_dir: qemu_desktopdir)
197 modules += {'ui': ui_modules}