Commit 0f0db14e authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

meson: Make doc building dependent on gtk-doc

Currently, when gtk-doc is not installed 'ninja' succeeds but
'ninja install' fails with the following error:

   FileNotFoundError: [Errno 2] No such file or directory: 'gtkdoc-scan': 'gtkdoc-scan'

With this patch 'meson build' will log that documentations would not
build and 'ninja install' will succeed.

When forcing building docs with 'meson -Dbuild_docs=true build' the
following error will occur instead:

  meson.build:323:0: ERROR:  Dependency "gtk-doc" not found, tried pkgconfig and cmake

Cc: Petri Latvala <petri.latvala@intel.com>
Reported-by: Tvrtko Ursulin's avatarTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala's avatarPetri Latvala <petri.latvala@intel.com>
parent 21e45c99
Pipeline #21765 failed with stages
in 2 minutes and 15 seconds
......@@ -320,9 +320,11 @@ endif
subdir('overlay')
subdir('man')
gtk_doc = dependency('gtk-doc', required : _docs_required)
docs_info = 'No'
if _build_docs
if _build_tests
if _build_tests and gtk_doc.found()
subdir('docs')
docs_info = 'Yes'
elif _docs_required
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment