summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-04-27 12:08:52 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2021-08-14 15:34:23 +0100
commit6c3b7a487b82090b125614ea983e47d4d8c10537 (patch)
tree61ed47f2728db09a42ab39f0a1a4259c318c63b7 /meson.build
parentd0a2031c5c8b85e0ea5481f8d4edf99deac3ae36 (diff)
downloadcairo-6c3b7a487b82090b125614ea983e47d4d8c10537.tar.gz
meson: Build the API reference
The Meson build system should build the API reference using gtk-doc, like the Autotools build does. The option is called `gtk_doc`, which matches the existing practices in various projects using Meson and gtk-doc.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index ce7449ffb..d78a5f2d6 100644
--- a/meson.build
+++ b/meson.build
@@ -971,6 +971,14 @@ if not get_option('tests').disabled() and feature_conf.get('CAIRO_HAS_PNG_FUNCTI
subdir('perf')
endif
+if get_option('gtk_doc')
+ if not meson.version().version_compare('>=0.52.0')
+ error('Building documentation requires Meson >= 0.52.0.')
+ endif
+ doc_srcdir = include_directories('src')
+ subdir('doc/public')
+endif
+
configure_file(output: 'config.h', configuration: conf)
foreach feature: built_features
@@ -1039,5 +1047,6 @@ if meson.version().version_compare('>= 0.53')
summary({
'cairo-trace:': conf.get('CAIRO_HAS_TRACE', 0) == 1,
'cairo-script-interpreter': conf.get('CAIRO_HAS_INTERPRETER', 0) == 1,
+ 'API reference': get_option('gtk_doc'),
}, section: 'Features and Utilities', bool_yn: true)
endif