summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2021-05-05 16:09:00 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2021-05-05 16:09:00 +0200
commitc47657158a0bfddf526e24191c233567ff0b2708 (patch)
tree27eaf8e88e7d564b1bc4f0a3a5e0e4b3b607abf2 /meson.build
parentb33124ab780761b2550c5c7769988c072ccc7759 (diff)
Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
* meson.build: * docs/reference/meson.build: Call add_dist_script() in a subproject, if meson.version() >= 0.58.0.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 7 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 17e004e..028a09c 100644
--- a/meson.build
+++ b/meson.build
@@ -254,6 +254,9 @@ cairommconfig_h = configure_file(
install_dir: install_includeconfigdir,
)
+# add_dist_script() is not allowed in a subproject if meson.version() < 0.58.0.
+can_add_dist_script = not meson.is_subproject() or meson.version().version_compare('>= 0.58.0')
+
subdir('MSVC_NMake/cairomm')
subdir('data')
subdir('cairomm')
@@ -261,9 +264,8 @@ subdir('examples')
subdir('tests')
subdir('docs/reference')
-if not meson.is_subproject()
+if can_add_dist_script
# Add a ChangeLog file to the distribution directory.
- # (add_dist_script() is not allowed in a subproject)
meson.add_dist_script(
python3.path(), dist_changelog_py,
project_source_root,
@@ -275,8 +277,9 @@ if not meson.is_subproject()
project_source_root,
'untracked' / 'build_scripts',
)
-else
- # This is a subproject.
+endif
+
+if meson.is_subproject()
cairomm_dep = declare_dependency(
dependencies: cairomm_own_dep,
variables: {