summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2019-07-03 18:07:56 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2019-07-03 18:07:56 +0100
commit03e48582b8236ea6370497adcbcdfec92b594315 (patch)
treef0b2fe7839a8655023aa56006324b932c1240068
parent9b7bda613767487e8a4e04c91c6fc6dc92550c39 (diff)
downloadgtk+-gtkdoc-subproject.tar.gz
build: Check the version of GTK-Docgtkdoc-subproject
We lost widget style properties and container child properties in this new major API version; sadly, GTK-Doc still tries to inspect widgets and containers for them. Newer version of GTK-Doc know how to do a version check against GTK, but older versions can't know that. We can't specify a minimum version of GTK-Doc to use with Meson, so we need to check the version manually.
-rw-r--r--docs/reference/meson.build20
1 files changed, 15 insertions, 5 deletions
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index a308cc4c87..511f599aea 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -1,4 +1,14 @@
-if get_option('gtk_doc')
+build_docs = get_option('gtk_doc')
+if build_docs
+ gtkdoc_scangobj = find_program('gtkdoc-scangobj')
+ gtkdoc_ver = run_command(gtkdoc_scangobj, '--version').stdout().strip()
+ if gtkdoc_ver.version_compare('<1.30')
+ warning('GTK-Doc version is too old for GTK4')
+ build_docs = false
+ endif
+endif
+
+if build_docs
glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
@@ -15,8 +25,8 @@ if get_option('gtk_doc')
src_dir_conf = configuration_data()
src_dir_conf.set('SRC_DIR', meson.source_root())
-endif
-subdir('gdk')
-subdir('gsk')
-subdir('gtk')
+ subdir('gdk')
+ subdir('gsk')
+ subdir('gtk')
+endif