diff options
author | Patrick Griffis <pgriffis@igalia.com> | 2022-04-14 13:08:29 -0500 |
---|---|---|
committer | Patrick Griffis <pgriffis@igalia.com> | 2022-04-14 13:47:30 -0500 |
commit | 12de631f425c0898fe6ef6906b71166870118679 (patch) | |
tree | 9b2d06857db22e37ea53031d7085afcc298db922 | |
parent | 0ba4a7e97a7de706e8601b707472e461527cad17 (diff) | |
download | libsoup-12de631f425c0898fe6ef6906b71166870118679.tar.gz |
build: Handle docs being built without introspection
-rw-r--r-- | docs/reference/meson.build | 10 | ||||
-rw-r--r-- | meson.build | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/docs/reference/meson.build b/docs/reference/meson.build index 32f6f748..92710260 100644 --- a/docs/reference/meson.build +++ b/docs/reference/meson.build @@ -16,7 +16,15 @@ gidocgen_dep = dependency('gi-docgen', version: '>= 2021.1', required: get_option('docs') ) -if gidocgen_dep.found() +have_docs = gidocgen_dep.found() +if not enable_introspection and get_option('docs').auto() + have_docs = false + warning('Documentation will not be built as introspection was disabled') +elif not enable_introspection and get_option('docs').enabled() + error('Documentation cannot be built without introspection being enabled') +endif + +if have_docs libsoup_toml = configure_file( input: 'libsoup.toml.in', output: 'libsoup.toml', diff --git a/meson.build b/meson.build index d878d2e9..43531948 100644 --- a/meson.build +++ b/meson.build @@ -402,7 +402,7 @@ subdir('examples') subdir('fuzzing') if get_option('tests') subdir('tests') - endif +endif srcdir = include_directories('libsoup') subdir('docs/reference') @@ -422,7 +422,7 @@ summary({ 'Translations' : xgettext.found(), 'GIR' : enable_introspection, 'VAPI' : enable_vapi, - 'Documentation' : gidocgen_dep.found(), + 'Documentation' : have_docs, }, section : 'Features' ) |