# Extra markdown files
pika_ui_doc_content_files = [
  'widget-gallery.md',
]

pika_ui_doc_toml = configure_file(
  input: 'pika-ui-3.0.toml.in',
  output: '@BASENAME@',
  configuration: {
    'PIKA_VERSION': pika_version,
    'PIKA_LOGO': '../images/' + (stable ? 'pika-logo.png' : 'pika-devel-logo.png'),
  },
)

pika_ui_docs = custom_target('pika-ui-docs',
  input: libpikaui_gir[0],
  output: 'libpikaui-@0@'.format(pika_api_version),
  command: [
    gi_docgen,
    'generate',
    '--quiet',
    '--fatal-warnings',
    '--config', pika_ui_doc_toml,
    '--output-dir=@OUTPUT@',
    '--no-namespace-dir',
    '--content-dir=@0@'.format(meson.current_source_dir()),
    '--add-include-path=@0@'.format(meson.project_build_root() / 'libpika'),
    '--add-include-path=@0@'.format(get_option('prefix') / 'share' / 'gir-1.0'),
    '@INPUT@',
  ],
  depends: libpika_gir[0],
  depend_files: [
    pika_ui_doc_toml,
    pika_ui_doc_content_files,
  ],
  build_by_default: true,
  install: true,
  install_dir: get_option('datadir') / 'doc' / 'pika-@0@'.format(pika_app_version),
)
