[gnome-builder] build: make webkit usage configurable
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] build: make webkit usage configurable
- Date: Thu, 27 Jan 2022 20:46:53 +0000 (UTC)
commit d0c1527b4483f04a570326245a06501b70b4561c
Author: Christian Hergert <chergert redhat com>
Date: Thu Jan 27 12:45:26 2022 -0800
build: make webkit usage configurable
Use -Dwebkit=disabled to disable webkit support.
Fixes #1137
meson.build | 4 ++--
meson_options.txt | 2 ++
src/libide/gui/meson.build | 6 +++++-
src/libide/meson.build | 6 +++---
src/meson.build | 2 +-
src/plugins/devhelp/meson.build | 2 +-
src/plugins/meson.build | 2 +-
7 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index c0342b8d0..e07da93a3 100644
--- a/meson.build
+++ b/meson.build
@@ -288,10 +288,10 @@ libpeas_dep = dependency('libpeas-1.0', version: '>= 1.22.0')
libportal_dep = dependency('libportal-gtk3', required: false)
libtemplate_glib_dep = dependency('template-glib-1.0', version: '>= 3.28.0')
libvte_dep = dependency('vte-2.91', version: '>= 0.65.0')
-libwebkit_dep = dependency('webkit2gtk-4.0', version: '>= 2.26', required: false)
libxml2_dep = dependency('libxml-2.0', version: '>= 2.9.0')
-if libwebkit_dep.found()
+if get_option('webkit').enabled()
+ libwebkit_dep = dependency('webkit2gtk-4.0', version: '>= 2.26')
config_h.set10('HAVE_WEBKIT', 1)
endif
diff --git a/meson_options.txt b/meson_options.txt
index f6c5113ba..fb3c06110 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -19,6 +19,8 @@ option('network_tests', type: 'boolean', value: true, description: 'Allow networ
option('ctags_path', type: 'string', value: '')
+option('webkit', type: 'feature', value: 'enabled', description: 'Enable features which require WebKit')
+
option('plugin_autotools', type: 'boolean')
option('plugin_beautifier', type: 'boolean')
option('plugin_blueprint', type: 'boolean')
diff --git a/src/libide/gui/meson.build b/src/libide/gui/meson.build
index 104c5a74a..585ba7d30 100644
--- a/src/libide/gui/meson.build
+++ b/src/libide/gui/meson.build
@@ -179,7 +179,7 @@ libide_gui_deps = [
libdazzle_dep,
libhandy_dep,
libpeas_dep,
- libwebkit_dep,
+
dependency('libcmark', version: '>= 0.29.0'),
libide_core_dep,
@@ -192,6 +192,10 @@ libide_gui_deps = [
libide_themes_dep,
]
+if get_option('webkit').enabled()
+ libide_gui_deps += [libwebkit_dep]
+endif
+
#
# Library Definitions
#
diff --git a/src/libide/meson.build b/src/libide/meson.build
index 49499430f..d03bb17a1 100644
--- a/src/libide/meson.build
+++ b/src/libide/meson.build
@@ -19,11 +19,11 @@ subdir('sourceview')
subdir('editor')
subdir('lsp')
subdir('greeter')
-if libwebkit_dep.found()
+subdir('tree')
+
+if get_option('webkit').enabled()
subdir('webkit')
endif
-subdir('tree')
-
py_installation = pymod.find_installation('python3')
py_installation.install_sources('Ide.py', subdir: 'gi' / 'overrides')
diff --git a/src/meson.build b/src/meson.build
index 4c14016b7..9128f766f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -70,7 +70,7 @@ gnome_builder_static = [
plugins,
]
-if libwebkit_dep.found()
+if get_option('webkit').enabled()
gnome_builder_deps += [libide_webkit_dep]
gnome_builder_static += [libide_webkit]
endif
diff --git a/src/plugins/devhelp/meson.build b/src/plugins/devhelp/meson.build
index fb01be306..55afab425 100644
--- a/src/plugins/devhelp/meson.build
+++ b/src/plugins/devhelp/meson.build
@@ -1,6 +1,6 @@
if get_option('plugin_devhelp')
-if not libwebkit_dep.found()
+if not get_option('webkit').enabled()
error('WebKit must be enabled for devhelp support')
endif
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 1823c6491..f4d29a5b2 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -32,7 +32,7 @@ plugins_deps = [
libide_vcs_dep,
]
-if libwebkit_dep.found()
+if get_option('webkit').enabled()
plugins_deps += [libide_webkit_dep]
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]