diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2022-08-22 18:47:50 +0100 |
---|---|---|
committer | Cleo Menezes Jr <cleomenezesjr@gmail.com> | 2022-08-22 17:07:57 -0400 |
commit | e348cd91b45ea78ce163a174596fe4874e9348ae (patch) | |
tree | eddb0ccdd5076c991fdcd5c1873ca3b9415c1cb6 | |
parent | b423aaea58e1e4443fe8532fe1731b9ed8100d59 (diff) | |
download | libgweather-e348cd91b45ea78ce163a174596fe4874e9348ae.tar.gz |
build: Disable documentation when cross-compiling
The API reference depends on the introspection data, and in order to
build that, we have to ensure that we are not cross-compiling.
Fixes: #170
-rw-r--r-- | doc/meson.build | 2 | ||||
-rw-r--r-- | libgweather/meson.build | 3 | ||||
-rw-r--r-- | meson.build | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/doc/meson.build b/doc/meson.build index aca2482..de2a2b5 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -1,4 +1,4 @@ -if get_option('gtk_doc') and get_option('introspection') +if build_docs dependency('gi-docgen', version: '>= 2021.6', fallback: ['gi-docgen', 'dummy_dep'], ) diff --git a/libgweather/meson.build b/libgweather/meson.build index 22738e6..d076c5f 100644 --- a/libgweather/meson.build +++ b/libgweather/meson.build @@ -200,9 +200,6 @@ lib_libgweather = library('gweather-4', install: true, ) -g_ir_scanner = find_program('g-ir-scanner', required: get_option('introspection')) -build_gir = get_option('introspection') and g_ir_scanner.found() and not meson.is_cross_build() - enable_vala = get_option('enable_vala') vapigen = find_program('vapigen', required: enable_vala == 'true') if enable_vala == 'auto' or enable_vala == 'true' diff --git a/meson.build b/meson.build index 27fcdc7..8d56d69 100644 --- a/meson.build +++ b/meson.build @@ -50,6 +50,10 @@ pylint_flags = [ py = import('python').find_installation('python3', modules: ['gi']) gen_locations_variant = find_program('build-aux/meson/gen_locations_variant.py') +g_ir_scanner = find_program('g-ir-scanner', required: get_option('introspection')) +build_gir = get_option('introspection') and g_ir_scanner.found() and not meson.is_cross_build() +build_docs = get_option('gtk_doc') and build_gir + subdir('data') subdir('schemas') subdir('libgweather') @@ -74,7 +78,7 @@ summary({ 'Use libsoup-2': get_option('soup2'), 'Introspection': build_gir, 'Generate VAPI': build_vapi, - 'API reference': get_option('gtk_doc'), + 'API reference': build_docs, }, section: 'Build', bool_yn: true, |