gimp/devel-docs/reference/gimp-ui/meson.build
Niels De Graef 92e80d12e8 docs: Migrate from gtk-doc to gi-docgen
gtk-doc has been slowly dying for the past few years; with gi-docgen we
have a nice successor.

This also makes sure the C documentation also uses the GIR file, which
in turn means faster build times (since all the C code doesn't have to
be parsed and recompiled again), and has a clear dependency graph.

See the [gi-docgen tutorial] for more info on how the system works.

[gi-docgen tutorial]: https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html
2021-12-27 10:47:34 +01:00

38 lines
917 B
Meson

# Extra markdown files
gimp_ui_doc_content_files = [
'widget-gallery.md',
]
gimp_ui_doc_toml = configure_file(
input: 'gimp-ui-3.0.toml.in',
output: '@BASENAME@',
configuration: {
'GIMP_VERSION': gimp_version,
'GIMP_LOGO': gimp_logo_dir / 'gimp-logo.png',
},
)
gimp_ui_docs = custom_target('gimp-ui-docs',
input: libgimpui_gir[0],
output: 'GimpUi-@0@'.format(gimp_api_version),
command: [
gi_docgen,
'generate',
'--quiet',
'--fatal-warnings',
'--config', gimp_ui_doc_toml,
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'--add-include-path=@0@'.format(meson.build_root() / 'libgimp'),
'@INPUT@',
],
depends: libgimp_gir[0],
depend_files: [
gimp_ui_doc_toml,
gimp_ui_doc_content_files,
],
build_by_default: true,
install: true,
install_dir: get_option('datadir') / 'doc',
)