meson: print disabled backends in the final build summary

It's easy to miss what's not getting build otherwise
This commit is contained in:
Christoph Reiter 2019-06-17 17:50:42 +00:00 committed by Matthias Clasen
parent 47da5607e1
commit 94555371f5
7 changed files with 28 additions and 4 deletions

View File

@ -257,7 +257,7 @@ endif
gdk_backends = []
gdk_backends_gen_headers = [] # non-public generated headers
foreach backend : ['broadway', 'quartz', 'wayland', 'win32', 'x11']
foreach backend : ['broadway', 'quartz', 'wayland', 'win32', 'x11', 'mir']
if get_variable('@0@_enabled'.format(backend))
subdir(backend)
gdk_deps += get_variable('gdk_@0@_deps'.format(backend))

View File

@ -39,4 +39,7 @@ libgdk_mir_la_SOURCES = \
libgdkinclude_HEADERS = \
gdkmir.h
EXTRA_DIST += \
meson.build
-include $(top_srcdir)/git.mk

1
gdk/mir/meson.build Normal file
View File

@ -0,0 +1 @@
error('Mir gdk backend not ported to meson yet')

View File

@ -130,6 +130,7 @@ wayland_enabled = get_option('wayland_backend')
broadway_enabled = get_option('broadway_backend')
quartz_enabled = get_option('quartz_backend')
win32_enabled = get_option('win32_backend')
mir_enabled = get_option('mir_backend')
os_unix = false
os_linux = false
@ -907,11 +908,14 @@ gtk_pcs = ['gtk+-3.0.pc']
gdk_pcs = ['gdk-3.0.pc']
pkg_targets = ''
foreach backend: [ 'broadway', 'quartz', 'wayland', 'win32', 'x11', ]
disabled_backends = []
foreach backend: [ 'broadway', 'quartz', 'wayland', 'win32', 'x11', 'mir']
if get_variable('@0@_enabled'.format(backend))
gtk_pcs += ['gtk+-@0@-3.0.pc'.format(backend)]
gdk_pcs += ['gdk-@0@-3.0.pc'.format(backend)]
pkg_targets += ' ' + backend
else
disabled_backends += [backend]
endif
endforeach
pkgconf.set('GDK_BACKENDS', pkg_targets.strip())
@ -962,8 +966,8 @@ summary = [
'------',
'GTK+ @0@ (@1@)'.format(gtk_version, gtk_api_version),
'',
' Display backends: @0@'.format(pkg_targets.strip()),
' Print backends: @0@'.format(' '.join(print_backends)),
' Display backends: @0@ [disabled: @1@]'.format(pkg_targets.strip(), ' '.join(disabled_backends)),
' Print backends: @0@ [disabled: @1@]'.format(' '.join(print_backends), ' '.join(disabled_print_backends)),
' Cloud support: @0@'.format(get_option('cloudproviders')),
' Colord support: @0@'.format(get_option('colord')),
' Profiler: @0@'.format(get_option('profiler')),
@ -971,6 +975,7 @@ summary = [
' Documentation: @0@'.format(get_option('gtk_doc')),
' Man pages: @0@'.format(get_option('man')),
' Build tests: @0@'.format(get_option('tests')),
' Installed tests: @0@'.format(get_option('installed_tests')),
' Demos: @0@'.format(get_option('demos')),
' Examples: @0@'.format(get_option('examples')),
'Directories:',

View File

@ -9,6 +9,8 @@ option('win32_backend', type: 'boolean', value: true,
description : 'Enable the Windows gdk backend (only when building on Windows)')
option('quartz_backend', type: 'boolean', value: true,
description : 'Enable the macOS gdk backend (only when building on macOS)')
option('mir_backend', type: 'boolean', value: false,
description : 'Enable the Mir gdk backend')
# Optional dependencies
option('xinerama', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
@ -39,6 +41,8 @@ option('examples', type: 'boolean', value: 'true',
description : 'Build examples')
option('tests', type: 'boolean', value: 'true',
description : 'Build tests')
option('installed_tests', type: 'boolean', value: 'false',
description : 'enable installed tests')
# input modules
option('builtin_immodules', type: 'combo', choices : ['yes', 'no', 'auto'],

View File

@ -106,6 +106,13 @@ endif
cdata.set_quoted('GTK_PRINT_BACKENDS', ','.join(print_backends))
disabled_print_backends = []
foreach backend : all_print_backends
if not print_backends.contains(backend)
disabled_print_backends += [backend]
endif
endforeach
# Building
printbackends_args = [

View File

@ -1,3 +1,7 @@
if get_option('installed_tests')
error('installed tests haven\'t been ported to meson yet')
endif
subdir('gtk')
subdir('gdk')
subdir('css')