diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-03-26 15:23:25 +0100 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-03-26 15:23:25 +0100 |
commit | 473f835911ca967a178edad3c6dd8c69183c2038 (patch) | |
tree | d8af7df1d595149ef2e1068ff631e7ab8193f32b /meson.build | |
parent | f4f6dff1c96f60b93e47d6850a43e3e747ce3154 (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.build | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/meson.build b/meson.build index ba158d6..17e004e 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,8 @@ project('cairomm', 'cpp', default_options: [ 'cpp_std=c++11', ], - 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.0' @@ -274,6 +275,19 @@ if not meson.is_subproject() project_source_root, 'untracked' / 'build_scripts', ) +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. |