meson: doc: Fix building documentation when using subprojects
authorThibault Saunier <tsaunier@gnome.org>
Thu, 25 Aug 2016 18:04:54 +0000 (15:04 -0300)
committerThibault Saunier <tsaunier@gnome.org>
Thu, 25 Aug 2016 18:15:05 +0000 (15:15 -0300)
And check the presence of gtk-doc before building the documentation

docs/libs/meson.build
meson.build

index 20b4602239cabd355a259a7a5734c19744d133e7..cd974199416ab0c1e381283dfa1a4cfdbb194691 100644 (file)
@@ -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'
index 88ffeec297bafb26791fc5b827dc179d803da0c8..5e08b095656851e3c7aebfe751dbf755e6e1e9d7 100644 (file)
@@ -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