Commit 3b69dca0 authored by Iñigo Martínez's avatar Iñigo Martínez

meson: Improve documentation generation

GtkDoc generated documentation takes advantage of different new
meson's improvements.

It uses the `gtkdoc_html_dir` function to set the paths to be fixed.
It also makes use of the `ignore_headers` parameter. Finally, it
uses the `version.xml` file target as a content file instad of
assuming the same build location.
parent 59450fff
glib_prefix = glib_dep.get_pkgconfig_variable('prefix')
fixxref_args = [
'--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('glib')),
'--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('gobject')),
'--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('gio')),
'--html-dir=' + join_paths(libgit2_glib_prefix, gnome.gtkdoc_html_dir(libgit2_glib_api_name)),
docs_conf = configuration_data()
docs_conf.set('PACKAGE_VERSION', libgit2_glib_version)
name = 'version.xml'
content_files = configure_file(
input: name + '.in',
output: name,
configuration: docs_conf,
glib_prefix = glib_dep.get_pkgconfig_variable('prefix')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
main_sgml: libgit2_glib_api_name + '-docs.sgml',
src_dir: join_paths(meson.source_root(), 'libgit2-glib'),
dependencies: libgit2_glib_dep,
ignore_headers: private_headers,
gobject_typesfile: libgit2_glib_api_name + '.types',
scan_args: [
'--ignore-headers=' + ' '.join(private_headers),
fixxref_args: [
'--extra-dir=' + join_paths(glib_docpath, 'glib'),
'--extra-dir=' + join_paths(glib_docpath, 'gobject'),
'--extra-dir=' + join_paths(glib_docpath, 'gio'),
'--html-dir=' + join_paths(libgit2_glib_prefix, gnome.gtkdoc_html_dir(libgit2_glib_api_name)),
scan_args: '--rebuild-types',
fixxref_args: fixxref_args,
content_files: content_files,
install: true,
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