From 20d0d6fae2d587c8a88bc1720bfa4c34185d83f9 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 11 Apr 2020 15:41:47 +0100 Subject: [PATCH 1/2] Revert "Do not install GSK headers for missing backends" This reverts commit cd5cded430c37fcb57d0ecc03f8fdf2fdbe12c54. The headers are public, but the symbols availability is conditional on the GTK build. --- gsk/meson.build | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/gsk/meson.build b/gsk/meson.build index 0b1d0d7b3f..8aeae9e7e8 100644 --- a/gsk/meson.build +++ b/gsk/meson.build @@ -60,7 +60,6 @@ gsk_public_headers = files([ ]) install_headers(gsk_public_headers, 'gsk.h', subdir: 'gtk-4.0/gsk') - gsk_public_gl_headers = files([ 'gl/gskglrenderer.h' ]) @@ -70,20 +69,14 @@ gsk_public_headers += gsk_public_gl_headers gsk_public_broadway_headers = files([ 'broadway/gskbroadwayrenderer.h' ]) - -if get_variable('broadway_enabled') - install_headers(gsk_public_broadway_headers, subdir: 'gtk-4.0/gsk/broadway') - gsk_public_headers += gsk_public_broadway_headers -endif +install_headers(gsk_public_broadway_headers, subdir: 'gtk-4.0/gsk/broadway') +gsk_public_headers += gsk_public_broadway_headers gsk_public_vulkan_headers = files([ 'vulkan/gskvulkanrenderer.h' ]) - -if have_vulkan - install_headers(gsk_public_vulkan_headers, subdir: 'gtk-4.0/gsk/vulkan') - gsk_public_headers += gsk_public_vulkan_headers -endif +install_headers(gsk_public_vulkan_headers, subdir: 'gtk-4.0/gsk/vulkan') +gsk_public_headers += gsk_public_vulkan_headers gsk_private_vulkan_shaders = [] # This is an odd split because we use configure_file() below to workaround From d08310096c623ae749eff587892b1524b93c5216 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 11 Apr 2020 15:42:51 +0100 Subject: [PATCH 2/2] Conditionally include the GSK broadway and vulkan symbols In case GTK is built without these features. --- gtk/gentypefuncs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk/gentypefuncs.py b/gtk/gentypefuncs.py index 522c04688a..d21622961a 100644 --- a/gtk/gentypefuncs.py +++ b/gtk/gentypefuncs.py @@ -59,7 +59,7 @@ for f in funcs: file_output += ['#ifdef GDK_WINDOWING_X11'] file_output += ['*tp++ = {0}();'.format(f)] file_output += ['#endif'] - elif f.startswith('gdk_broadway'): + elif f.startswith('gdk_broadway') or f.startswith('gsk_broadway'): file_output += ['#ifdef GDK_WINDOWING_BROADWAY'] file_output += ['*tp++ = {0}();'.format(f)] file_output += ['#endif'] @@ -75,6 +75,10 @@ for f in funcs: file_output += ['#ifdef GDK_WINDOWING_QUARTZ'] file_output += ['*tp++ = {0}();'.format(f)] file_output += ['#endif'] + elif f.startswith('gsk_vulkan'): + file_output += ['#ifdef GDK_RENDERING_VULKAN'] + file_output += ['*tp++ = {0}();'.format(f)] + file_output += ['#endif'] else: file_output += ['*tp++ = {0}();'.format(f)]