[gtk/gtk-3-24: 1/2] meson: print disabled backends in the final build summary
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] meson: print disabled backends in the final build summary
- Date: Mon, 17 Jun 2019 17:51:01 +0000 (UTC)
commit 94555371f51e11304dd7508a7f888c05651087bf
Author: Christoph Reiter <reiter christoph gmail com>
Date: Mon Jun 17 17:50:42 2019 +0000
meson: print disabled backends in the final build summary
It's easy to miss what's not getting build otherwise
gdk/meson.build | 2 +-
gdk/mir/Makefile.am | 3 +++
gdk/mir/meson.build | 1 +
meson.build | 11 ++++++++---
meson_options.txt | 4 ++++
modules/printbackends/meson.build | 7 +++++++
testsuite/meson.build | 4 ++++
7 files changed, 28 insertions(+), 4 deletions(-)
---
diff --git a/gdk/meson.build b/gdk/meson.build
index 49df660482..aa2e0ae86c 100644
--- a/gdk/meson.build
+++ b/gdk/meson.build
@@ -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))
diff --git a/gdk/mir/Makefile.am b/gdk/mir/Makefile.am
index 71b6e37210..0f0174cefc 100644
--- a/gdk/mir/Makefile.am
+++ b/gdk/mir/Makefile.am
@@ -39,4 +39,7 @@ libgdk_mir_la_SOURCES = \
libgdkinclude_HEADERS = \
gdkmir.h
+EXTRA_DIST += \
+ meson.build
+
-include $(top_srcdir)/git.mk
diff --git a/gdk/mir/meson.build b/gdk/mir/meson.build
new file mode 100644
index 0000000000..db5acdac09
--- /dev/null
+++ b/gdk/mir/meson.build
@@ -0,0 +1 @@
+error('Mir gdk backend not ported to meson yet')
diff --git a/meson.build b/meson.build
index f2301aa082..ffcf9d88b3 100644
--- a/meson.build
+++ b/meson.build
@@ -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:',
diff --git a/meson_options.txt b/meson_options.txt
index 811a8f4069..4e51f9e6fc 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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'],
diff --git a/modules/printbackends/meson.build b/modules/printbackends/meson.build
index a83dbe0561..3a6b660e6c 100644
--- a/modules/printbackends/meson.build
+++ b/modules/printbackends/meson.build
@@ -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 = [
diff --git a/testsuite/meson.build b/testsuite/meson.build
index 5a226ca229..7b855c8a48 100644
--- a/testsuite/meson.build
+++ b/testsuite/meson.build
@@ -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')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]