aboutsummaryrefslogtreecommitdiff
path: root/ui/meson.build
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-07-16 23:21:02 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:21 -0400
commit2b1ccdf44146424032e384749efa993855f3bda6 (patch)
tree13bf396441fb7b12e88fa501ec8973ab8ec0812f /ui/meson.build
parent478e943f515bffb712ff65a85b5db36c90a2f5e7 (diff)
meson: convert ui directory to Meson
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ui/meson.build')
-rw-r--r--ui/meson.build82
1 files changed, 81 insertions, 1 deletions
diff --git a/ui/meson.build b/ui/meson.build
index 35da0d8d26..66282c398d 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -1,3 +1,82 @@
+softmmu_ss.add(files(
+ 'console.c',
+ 'cursor.c',
+ 'input-keymap.c',
+ 'input-legacy.c',
+ 'input-barrier.c',
+ 'input.c',
+ 'kbd-state.c',
+ 'keymaps.c',
+ 'qemu-pixman.c',
+))
+softmmu_ss.add(pixman)
+
+softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c'))
+softmmu_ss.add(when: 'CONFIG_SPICE', if_true: files('spice-core.c', 'spice-input.c', 'spice-display.c'))
+softmmu_ss.add(when: [cocoa, 'CONFIG_COCOA'], if_true: files('cocoa.m'))
+
+vnc_ss = ss.source_set()
+vnc_ss.add(files(
+ 'vnc.c',
+ 'vnc-enc-zlib.c',
+ 'vnc-enc-hextile.c',
+ 'vnc-enc-tight.c',
+ 'vnc-palette.c',
+ 'vnc-enc-zrle.c',
+ 'vnc-auth-vencrypt.c',
+ 'vnc-ws.c',
+ 'vnc-jobs.c',
+))
+vnc_ss.add(zlib)
+vnc_ss.add(when: 'CONFIG_VNC_SASL', if_true: [files('vnc-auth-sasl.c'), sasl])
+softmmu_ss.add_all(when: 'CONFIG_VNC', if_true: vnc_ss)
+softmmu_ss.add(when: 'CONFIG_VNC', if_false: files('vnc-stubs.c'))
+softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
+softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL_DMABUF'], if_true: files('egl-headless.c'))
+softmmu_ss.add(when: 'CONFIG_VNC_PNG', if_true: png)
+softmmu_ss.add(when: 'CONFIG_VNC_JPEG', if_true: jpeg)
+
+ui_modules = {}
+
+if config_host.has_key('CONFIG_CURSES')
+ curses_ss = ss.source_set()
+ curses_ss.add(when: [curses, iconv], if_true: files('curses.c'))
+ ui_modules += {'curses' : curses_ss}
+endif
+
+if config_host.has_key('CONFIG_GTK') and config_host.has_key('CONFIG_VTE')
+ softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
+
+ gtk_ss = ss.source_set()
+ gtk_ss.add(gtk, vte, files('gtk.c'))
+ gtk_ss.add(when: [x11, 'CONFIG_X11'], if_true: files('x_keymap.c'))
+ gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c'))
+ gtk_ss.add(when: [opengl, 'CONFIG_GTK_GL'], if_true: files('gtk-gl-area.c'))
+ ui_modules += {'gtk' : gtk_ss}
+endif
+
+if config_host.has_key('CONFIG_SDL')
+ softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
+
+ sdl_ss = ss.source_set()
+ sdl_ss.add(pixman, glib, files(
+ 'sdl2-2d.c',
+ 'sdl2-input.c',
+ 'sdl2.c',
+ ))
+ sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c'))
+ sdl_ss.add(when: [x11, 'CONFIG_X11'], if_true: files('x_keymap.c'))
+ ui_modules += {'sdl' : sdl_ss}
+endif
+
+if config_host.has_key('CONFIG_SPICE') and config_host.has_key('CONFIG_GIO')
+ spice_ss = ss.source_set()
+ spice_ss.add(spice, gio, files('spice-app.c'))
+ ui_modules += {'spice-app': spice_ss}
+endif
+
+keymap_gen = find_program('keycodemapdb/tools/keymap-gen')
+
keymaps = [
['atset1', 'qcode'],
['linux', 'qcode'],
@@ -24,7 +103,6 @@ if have_system
genh += custom_target(output,
output: output,
capture: true,
- build_by_default: true, # to be removed when added to a target
input: files('keycodemapdb/data/keymaps.csv'),
command: [python.full_path(), files('keycodemapdb/tools/keymap-gen'),
'--lang', 'glib2',
@@ -34,3 +112,5 @@ if have_system
endif
subdir('shader')
+
+modules += {'ui': ui_modules}