meson: Require gi-docgen when gtk_doc is required
authorNirbheek Chauhan <nirbheek@centricular.com>
Tue, 20 Dec 2022 03:54:30 +0000 (09:24 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Tue, 20 Dec 2022 03:57:48 +0000 (09:27 +0530)
commit4346a33a636fa45b141f23f83aca2de89612d2ec
tree68ed66f0ac13349edaf7c8718939df8ffb6418e5
parente049b6992ddd7a3198a6041c101c0012ef2588b6
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.
docs/reference/meson.build