Do not install GSK headers for missing backends

Broadway and Vulkan renderers are optional; if GTK hasn't been built
with their GSK renderers, we should not install their headers.
This commit is contained in:
Emmanuele Bassi 2020-04-08 15:30:46 +01:00
parent 54e4e6cd23
commit cd5cded430

View File

@ -60,6 +60,7 @@ gsk_public_headers = files([
])
install_headers(gsk_public_headers, 'gsk.h', subdir: 'gtk-4.0/gsk')
gsk_public_gl_headers = files([
'gl/gskglrenderer.h'
])
@ -69,14 +70,20 @@ gsk_public_headers += gsk_public_gl_headers
gsk_public_broadway_headers = files([
'broadway/gskbroadwayrenderer.h'
])
install_headers(gsk_public_broadway_headers, subdir: 'gtk-4.0/gsk/broadway')
gsk_public_headers += gsk_public_broadway_headers
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
gsk_public_vulkan_headers = files([
'vulkan/gskvulkanrenderer.h'
])
install_headers(gsk_public_vulkan_headers, subdir: 'gtk-4.0/gsk/vulkan')
gsk_public_headers += gsk_public_vulkan_headers
if have_vulkan
install_headers(gsk_public_vulkan_headers, subdir: 'gtk-4.0/gsk/vulkan')
gsk_public_headers += gsk_public_vulkan_headers
endif
gsk_private_vulkan_shaders = []
# This is an odd split because we use configure_file() below to workaround