From d18fff7ff5afd2534bc083e34d6f546b85be1a92 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 25 Aug 2016 15:04:06 -0300 Subject: [PATCH] meson: doc: Fix building documentation when using subprojects and check the presence of gtk-doc before building the documentation --- docs/gst/meson.build | 2 +- docs/libs/meson.build | 2 +- meson.build | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/gst/meson.build b/docs/gst/meson.build index c5a3516..605f6e1 100644 --- a/docs/gst/meson.build +++ b/docs/gst/meson.build @@ -4,7 +4,7 @@ configure_file(input : 'gstreamer.types.in', gnome.gtkdoc('gstreamer', main_sgml : 'gstreamer-docs.sgml', - src_dir : '@0@/gst'.format(meson.source_root()), + src_dir : '@0@/../../gst'.format(meson.current_source_dir()), scan_args : ['--deprecated-guards=GST_DISABLE_DEPRECATED', '--ignore-decorators=GST_EXPORT', '--ignore-headers=gettext.h glib-compat-private.h glib-compat.h gst-i18n-app.h gst-i18n-lib.h gst_private.h gstelementdetails.h gstmacros.h grammar.tab.h grammar.tab.pre.h math-compat.h types.h' diff --git a/docs/libs/meson.build b/docs/libs/meson.build index 56706a3..e127854 100644 --- a/docs/libs/meson.build +++ b/docs/libs/meson.build @@ -4,7 +4,7 @@ configure_file(input : 'gstreamer-libs.types', gnome.gtkdoc('gstreamer-libs', main_sgml : 'gstreamer-libs-docs.sgml', - src_dir : '@0@/libs/gst'.format(meson.source_root()), + src_dir : '@0@/../../libs/gst'.format(meson.current_source_dir()), scan_args : ['--deprecated-guards=GST_DISABLE_DEPRECATED', '--ignore-decorators=GST_EXPORT', '--ignore-headers=gettext.h glib-compat-private.h glib-compat.h gst-i18n-app.h gst-i18n-lib.h gst_private.h gstelementdetails.h gstmacros.h grammar.tab.h grammar.tab.pre.h math-compat.h types.h' diff --git a/meson.build b/meson.build index bc1cc58..d8de1a6 100644 --- a/meson.build +++ b/meson.build @@ -268,9 +268,14 @@ subdir('plugins') subdir('tools') subdir('pkgconfig') subdir('tests') -# FIXME: check for gtk-doc + +gtkdoc = find_program('gtkdoc-scan', required : false) if build_machine.system() != 'windows' - subdir('docs') + if gtkdoc.found() + subdir('docs') + else + message('Not building documentation as gtk-doc was not found') + endif else message('Disabling gtk-doc while building on Windows') endif -- 2.7.4