diff options
author | Maximiliano Sandoval R <msandova@gnome.org> | 2022-07-14 18:27:50 +0200 |
---|---|---|
committer | Maximiliano Sandoval R <msandova@gnome.org> | 2022-12-14 21:02:14 +0100 |
commit | 569d82feb50b012ef1930149cd6ef6668811df08 (patch) | |
tree | 49d3abd05f1f8fe66c36893ff34a44f6e8f89558 /docs/reference/meson.build | |
parent | 54d153efb64b8cb97e8306bcf5a2299fb5bed5b5 (diff) | |
download | libnotify-569d82feb50b012ef1930149cd6ef6668811df08.tar.gz |
docs: Port to gi-docgen
Fixes: https://gitlab.gnome.org/GNOME/libnotify/-/issues/26
Diffstat (limited to 'docs/reference/meson.build')
-rw-r--r-- | docs/reference/meson.build | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/docs/reference/meson.build b/docs/reference/meson.build index 148ff31..df461b1 100644 --- a/docs/reference/meson.build +++ b/docs/reference/meson.build @@ -1,10 +1,40 @@ -gnome.gtkdoc(meson.project_name(), - mode: 'sgml', - main_sgml: meson.project_name() + '-docs.sgml', - src_dir: join_paths(meson.project_source_root(), meson.project_name()), - dependencies: libnotify_dep, - gobject_typesfile: meson.project_name() + '.types', - ignore_headers: ['notify-enum-types.h', 'notify-marshal.h', 'internal.h'], - scan_args: [ '--deprecated-guards=LIBNOTIFY_DISABLE_DEPRECATED' ], +api_version_major = '0' +expand_content_md_files = [] + +toml_data = configuration_data() +toml_data.set('VERSION', meson.project_version()) + +libnotify_toml = configure_file( + input: 'libnotify.toml.in', + output: 'libnotify.toml', + configuration: toml_data +) + +dependency('gi-docgen', version: '>= 2021.7', + fallback: ['gi-docgen', 'dummy_dep'], + native: true, + required: get_option('gtk_doc')) + +gidocgen = find_program('gi-docgen') + +docs_dir = get_option('datadir') / 'doc' + +custom_target('libnotify-doc', + input: [ libnotify_toml, libnotify_gir[0] ], + output: 'libnotify-@0@'.format(api_version_major), + command: [ + gidocgen, + 'generate', + '--quiet', + '--add-include-path=@0@'.format(meson.current_build_dir() / '../../libnotify'), + '--config=@INPUT0@', + '--output-dir=@OUTPUT@', + '--no-namespace-dir', + '--content-dir=@0@'.format(meson.current_source_dir()), + '@INPUT1@', + ], + depend_files: [ expand_content_md_files ], + build_by_default: true, install: true, + install_dir: docs_dir, ) |