summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2021-03-16 14:46:49 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2021-03-16 14:46:49 +0100
commit90040647a069a43c69e948f82694fa37b54610f2 (patch)
tree45c0a3bec4032f603c8f66c0ee2334e3564e07dd /meson.build
parent4fe97af983213de24cb53cae9abd75458d57d088 (diff)
Meson build: Make it possible to use cairomm as a subproject
cairo and sigc++ can be subprojects of cairomm.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build16
1 files changed, 15 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 5b25206..66d10c7 100644
--- a/meson.build
+++ b/meson.build
@@ -6,7 +6,8 @@ project('cairomm', 'cpp',
default_options: [
'cpp_std=c++17',
],
- meson_version: '>= 0.50.0', # required for python3.path()
+ meson_version: '>= 0.54.0', # required for meson.override_dependency()
+ # and dep.get_variable(internal:)
)
cairomm_api_version = '1.16'
@@ -283,6 +284,19 @@ if not meson.is_subproject()
'untracked' / 'build_scripts',
dont_distribute,
)
+else
+ # This is a subproject.
+ cairomm_dep = declare_dependency(
+ dependencies: cairomm_own_dep,
+ variables: {
+ 'doxytagfile': tag_file.full_path(),
+ 'htmlrefdir': install_prefix / install_docdir / 'reference' / 'html',
+ 'htmlrefpub': 'http://www.cairographics.org/documentation/cairomm/reference'
+ }
+ )
+
+ # A main project that looks for cairomm_pcname.pc shall find cairomm_dep.
+ meson.override_dependency(cairomm_pcname, cairomm_dep)
endif
# Print a summary.