summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2021-05-15 10:51:03 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2021-05-15 10:51:03 +0200
commit008ebaae588c885b83adda901177a2b1c8c03b9d (patch)
tree2dea1f3a4db740c2229c74718ac18dac40cc6da5 /meson.build
parent19f08ffaf2c7245c240013be36b2f44f87582d6f (diff)
downloadglibmm-008ebaae588c885b83adda901177a2b1c8c03b9d.tar.gz
Fix build as subproject without building documentation
* meson.build: If mm-common-get is not found in maintainer-mode with 'required: false', try with 'required: true'. Don't try to use tag_file, if documentation is not built. * docs/reference/meson.build: Don't use variables from modules that don't define doxytagfile. These are subprojects that don't build their documentation.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build34
1 files changed, 19 insertions, 15 deletions
diff --git a/meson.build b/meson.build
index df3bf517..0ca01cb6 100644
--- a/meson.build
+++ b/meson.build
@@ -132,7 +132,11 @@ giomm_requires = ' '.join(giomm_requires)
# reference documentation shall be built.
mm_common_get = find_program('mm-common-get', required: false)
if maintainer_mode and not mm_common_get.found()
- error('mm-common-get not found. mm-common >= 1.0.0 is required.')
+ message('Maintainer mode requires the \'mm-common-get\' command. If it is not found,\n' +
+ 'install the \'mm-common\' package, version 1.0.0 or higher.')
+ # If meson --wrap-mode != forcefallback, Meson falls back to the mm-common
+ # subproject only if mm-common-get is required.
+ mm_common_get = find_program('mm-common-get', required: true)
endif
m4 = find_program('m4', required: maintainer_mode) # Used by gmmproc
perl = find_program('perl', required: maintainer_mode or build_documentation)
@@ -299,22 +303,22 @@ if meson.is_subproject()
pm_basefiles,
)
- glibmm_dep = declare_dependency(
- dependencies: glibmm_own_dep,
- variables: {
- 'gmmprocdir': gmmproc_subproj_dir,
- 'doxytagfile': tag_file.full_path(),
- 'htmlrefdir': install_prefix / install_docdir / 'reference' / 'html',
- 'htmlrefpub': 'http://library.gnome.org/devel/' + pkg_conf_data.get_unquoted('PACKAGE_TARNAME') + '/unstable/'
- }
- )
+ pkgconfig_vars = {
+ 'htmlrefdir': install_prefix / install_docdir / 'reference' / 'html',
+ 'htmlrefpub': 'http://library.gnome.org/devel/' + pkg_conf_data.get_unquoted('PACKAGE_TARNAME') + '/unstable/'
+ }
+ if build_documentation
+ pkgconfig_vars += {'doxytagfile': tag_file.full_path()}
+ endif
giomm_dep = declare_dependency(
dependencies: giomm_own_dep,
- variables: {
- 'doxytagfile': tag_file.full_path(),
- 'htmlrefdir': install_prefix / install_docdir / 'reference' / 'html',
- 'htmlrefpub': 'http://library.gnome.org/devel/' + pkg_conf_data.get_unquoted('PACKAGE_TARNAME') + '/unstable/'
- }
+ variables: pkgconfig_vars,
+ )
+
+ pkgconfig_vars += {'gmmprocdir': gmmproc_subproj_dir}
+ glibmm_dep = declare_dependency(
+ dependencies: glibmm_own_dep,
+ variables: pkgconfig_vars,
)
# A main project that looks for glibmm_pcname.pc and giomm_pcname.pc