From 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2 Mon Sep 17 00:00:00 2001 From: Roman Bolshakov Date: Sat, 2 Jan 2021 15:52:13 +0300 Subject: meson: Propagate gnutls dependency crypto/tlscreds.h includes GnuTLS headers if CONFIG_GNUTLS is set, but GNUTLS_CFLAGS, that describe include path, are not propagated transitively to all users of crypto and build fails if GnuTLS headers reside in non-standard directory (which is a case for homebrew on Apple Silicon). Signed-off-by: Roman Bolshakov Message-Id: <20210102125213.41279-1-r.bolshakov@yadro.com> Signed-off-by: Paolo Bonzini --- ui/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/meson.build b/ui/meson.build index 013258a01c..e6655c94a6 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -29,7 +29,7 @@ vnc_ss.add(files( 'vnc-ws.c', 'vnc-jobs.c', )) -vnc_ss.add(zlib, png, jpeg) +vnc_ss.add(zlib, png, jpeg, gnutls) vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c')) softmmu_ss.add_all(when: vnc, if_true: vnc_ss) softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c')) -- cgit v1.2.3 From 5cb69566daa8081abb82a13403dcc0fffed02007 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 7 Jan 2021 13:46:32 +0100 Subject: gtk: remove CONFIG_GTK_GL CONFIG_GTK_GL is defined if OpenGL is present and GTK+ is 3.16 or newer. Since GTK+ 3.22 is the minimum supported version, just use CONFIG_OPENGL instead. Signed-off-by: Paolo Bonzini --- ui/gtk.c | 16 ++++++++-------- ui/meson.build | 3 +-- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'ui') diff --git a/ui/gtk.c b/ui/gtk.c index a752aa22be..e8474456df 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -396,7 +396,7 @@ static void gd_update_full_redraw(VirtualConsole *vc) int ww, wh; ww = gdk_window_get_width(gtk_widget_get_window(area)); wh = gdk_window_get_height(gtk_widget_get_window(area)); -#if defined(CONFIG_GTK_GL) +#if defined(CONFIG_OPENGL) if (vc->gfx.gls && gtk_use_gl_area) { gtk_gl_area_queue_render(GTK_GL_AREA(vc->gfx.drawing_area)); return; @@ -625,7 +625,7 @@ static const DisplayChangeListenerOps dcl_ops = { /** DisplayState Callbacks (opengl version) **/ -#if defined(CONFIG_GTK_GL) +#if defined(CONFIG_OPENGL) static const DisplayChangeListenerOps dcl_gl_area_ops = { .dpy_name = "gtk-egl", @@ -644,7 +644,7 @@ static const DisplayChangeListenerOps dcl_gl_area_ops = { .dpy_gl_update = gd_gl_area_scanout_flush, }; -#endif /* CONFIG_GTK_GL */ +#endif /* CONFIG_OPENGL */ static const DisplayChangeListenerOps dcl_egl_ops = { .dpy_name = "gtk-egl", @@ -725,7 +725,7 @@ static void gd_set_ui_info(VirtualConsole *vc, gint width, gint height) dpy_set_ui_info(vc->gfx.dcl.con, &info); } -#if defined(CONFIG_GTK_GL) +#if defined(CONFIG_OPENGL) static gboolean gd_render_event(GtkGLArea *area, GdkGLContext *context, void *opaque) @@ -1865,7 +1865,7 @@ static void gd_connect_vc_gfx_signals(VirtualConsole *vc) { g_signal_connect(vc->gfx.drawing_area, "draw", G_CALLBACK(gd_draw_event), vc); -#if defined(CONFIG_GTK_GL) +#if defined(CONFIG_OPENGL) if (gtk_use_gl_area) { /* wire up GtkGlArea events */ g_signal_connect(vc->gfx.drawing_area, "render", @@ -1992,12 +1992,12 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc, #if defined(CONFIG_OPENGL) if (display_opengl) { -#if defined(CONFIG_GTK_GL) +#if defined(CONFIG_OPENGL) if (gtk_use_gl_area) { vc->gfx.drawing_area = gtk_gl_area_new(); vc->gfx.dcl.ops = &dcl_gl_area_ops; } else -#endif /* CONFIG_GTK_GL */ +#endif /* CONFIG_OPENGL */ { vc->gfx.drawing_area = gtk_drawing_area_new(); /* @@ -2314,7 +2314,7 @@ static void early_gtk_display_init(DisplayOptions *opts) assert(opts->type == DISPLAY_TYPE_GTK); if (opts->has_gl && opts->gl != DISPLAYGL_MODE_OFF) { #if defined(CONFIG_OPENGL) -#if defined(CONFIG_GTK_GL) && defined(GDK_WINDOWING_WAYLAND) +#if defined(GDK_WINDOWING_WAYLAND) if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default())) { gtk_use_gl_area = true; gtk_gl_area_init(); diff --git a/ui/meson.build b/ui/meson.build index e6655c94a6..bd2b920504 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -63,8 +63,7 @@ if config_host.has_key('CONFIG_GTK') gtk_ss = ss.source_set() gtk_ss.add(gtk, vte, pixman, 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')) + gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c', 'gtk-gl-area.c')) ui_modules += {'gtk' : gtk_ss} endif -- cgit v1.2.3 From 9d71037f4beb203e3fddfe78ac9d79ef34999796 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 7 Jan 2021 13:54:22 +0100 Subject: configure: move X11 detection to Meson For now move the logic verbatim. GTK+ actually has a hard requirement on X11 if gtk+x11 is present, but we will sort that out later. Signed-off-by: Paolo Bonzini --- ui/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/meson.build b/ui/meson.build index bd2b920504..cc764e1bd1 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -62,7 +62,7 @@ if config_host.has_key('CONFIG_GTK') gtk_ss = ss.source_set() gtk_ss.add(gtk, vte, pixman, files('gtk.c')) - gtk_ss.add(when: [x11, 'CONFIG_X11'], if_true: files('x_keymap.c')) + gtk_ss.add(when: x11, if_true: files('x_keymap.c')) gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c', 'gtk-gl-area.c')) ui_modules += {'gtk' : gtk_ss} endif @@ -77,7 +77,7 @@ if sdl.found() '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')) + sdl_ss.add(when: x11, if_true: files('x_keymap.c')) ui_modules += {'sdl' : sdl_ss} endif -- cgit v1.2.3 From 1b6954713fee49452077ebc09a8cf76b18cfe04e Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 7 Jan 2021 14:02:29 +0100 Subject: configure: move GTK+ detection to Meson This also allows removing CONFIG_NEED_X11, all the ingredients can be computed easily in meson.build. Signed-off-by: Paolo Bonzini --- ui/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/meson.build b/ui/meson.build index cc764e1bd1..634fabab0d 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -57,7 +57,7 @@ if config_host.has_key('CONFIG_OPENGL_DMABUF') ui_modules += {'egl-headless' : egl_headless_ss} endif -if config_host.has_key('CONFIG_GTK') +if gtk.found() softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c')) gtk_ss = ss.source_set() -- cgit v1.2.3