gtk2/docs/reference/meson.build
Nirbheek Chauhan 4346a33a63 meson: Require gi-docgen when gtk_doc is required
Fixes build with only `-Dgtk_doc=true` without
`-Dintrospection=enabled`:

    Program gi-docgen found: NO
    Configuring gdk4.toml using configuration

    docs/reference/gdk/meson.build:13:2: ERROR: Tried to use not-found external program in "command"

`introspection` is `auto` by default.

The rest of the docs build is only contingent on
`if get_option('gtk_doc')` so we should use the same restriction here.

We check for `build_gir` below already, and the gi-docgen subproject
itself does not need gobject-introspection so it's fine to do it like
this.
2022-12-20 09:27:48 +05:30

24 lines
485 B
Meson

toml_conf = configuration_data()
toml_conf.set('version', meson.project_version())
gidocgen = find_program('gi-docgen', required: get_option('gtk_doc'), native: true)
gidocgen_common_args = [
'--quiet',
'--no-namespace-dir',
]
if get_option('werror')
gidocgen_common_args += ['--fatal-warnings']
endif
docs_dir = gtk_datadir / 'doc'
if get_option('gtk_doc') and not build_gir
error('API reference requires introspection.')
endif
subdir('gdk')
subdir('gsk')
subdir('gtk')