[gnome-desktop/ebassi/update-for-gtk4: 20/23] Enable optional building of GTK4 libraries
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop/ebassi/update-for-gtk4: 20/23] Enable optional building of GTK4 libraries
- Date: Tue, 9 Nov 2021 16:19:45 +0000 (UTC)
commit 94e3fbc3759a6f26700c9647868525a0d2003d0f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Nov 9 15:46:41 2021 +0000
Enable optional building of GTK4 libraries
We want to allow building libgnome-desktop without the GUI libraries.
libgnome-desktop/meson.build | 6 ++++--
meson.build | 2 +-
meson_options.txt | 4 ++++
3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/libgnome-desktop/meson.build b/libgnome-desktop/meson.build
index 446c66fe..44bc4613 100644
--- a/libgnome-desktop/meson.build
+++ b/libgnome-desktop/meson.build
@@ -156,8 +156,10 @@ libgnome_desktop_base_dep = declare_dependency(
],
)
-subdir('gnome-bg')
-subdir('gnome-rr')
+if gtk4_dep.found()
+ subdir('gnome-bg')
+ subdir('gnome-rr')
+endif
### Legacy ###
introspection_sources = [
diff --git a/meson.build b/meson.build
index a54d3fd0..68613093 100644
--- a/meson.build
+++ b/meson.build
@@ -49,7 +49,7 @@ versiondir = datadir / 'gnome'
gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req)
gtk3_dep = dependency('gtk+-3.0', version: gtk3_req)
-gtk4_dep = dependency('gtk4', version: gtk4_req)
+gtk4_dep = dependency('gtk4', version: gtk4_req, required: get_option('build_gtk4'))
glib_dep = dependency('glib-2.0', version: glib_req)
gio_dep = dependency('gio-2.0', version: glib_req)
gio_unix_dep = dependency('gio-unix-2.0', version: glib_req)
diff --git a/meson_options.txt b/meson_options.txt
index c0fea3f8..9fe2d7bd 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -32,3 +32,7 @@ option('gtk_doc',
option('installed_tests',
type: 'boolean', value: false, description: 'Enable installed tests'
)
+
+option('build_gtk4',
+ type: 'boolean', value: true, description: 'Enable GTK4 libraries'
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]