From 2b9863c8b55b2810b517295b137f5ab94b167b5f Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 25 Aug 2016 15:04:54 -0300 Subject: [PATCH] meson: doc: Fix building documentation when using subprojects And check the presence of gtk-doc before building the documentation --- docs/libs/meson.build | 2 +- meson.build | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/libs/meson.build b/docs/libs/meson.build index 20b4602239..cd97419941 100644 --- a/docs/libs/meson.build +++ b/docs/libs/meson.build @@ -18,7 +18,7 @@ endforeach gnome.gtkdoc('gst-editing-services-@0@'.format(apiversion), main_sgml : 'ges-docs.sgml', - src_dir : '@0@/ges'.format(meson.source_root()), + src_dir : '@0@/../../ges'.format(meson.current_source_dir()), scan_args : ['--deprecated-guards=GST_DISABLE_DEPRECATED', '--ignore-decorators=GST_EXPORT', '--ignore-headers=gesmarshal.h ges-internal.h ges-auto-transition.h ges-structured-interface.h ges-structure-parser.h ges-smart-video-mixer.h gstframepositioner.h' diff --git a/meson.build b/meson.build index 88ffeec297..5e08b09565 100644 --- a/meson.build +++ b/meson.build @@ -82,6 +82,7 @@ configure_file(input : 'config.h.meson', gir = find_program('g-ir-scanner', required : false) gnome = import('gnome') +gtkdoc = find_program('gtkdoc-scan', required : false) # Fixme, not very elegant. build_gir = gir.found() and not meson.is_cross_build() @@ -97,4 +98,13 @@ subdir('tools') subdir('pkgconfig') subdir('tests') subdir('examples') -subdir('docs') + +if build_machine.system() != 'windows' + 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