summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2021-05-05 12:01:11 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2021-05-05 12:01:11 +0200
commit8960f32b5ca7a805980de8154e9884caf4d1f767 (patch)
treefc3bb27413cdd4307ad583c9f2035e7f58d337aa /meson.build
parentde48a71cbb59d3ca85a41277f496cd907df79db2 (diff)
downloadsigc++-8960f32b5ca7a805980de8154e9884caf4d1f767.tar.gz
Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
* meson.build: * MSVC_NMake/meson.build: * docs/docs/manual/meson.build: * docs/docs/reference/meson.build: Call add_dist_script() in a subproject, if meson.version() >= 0.58.0. * tools/handle-built-files.py: * tools/tutorial-custom-cmd.py: Use MESON_PROJECT_DIST_ROOT if it exists, else MESON_DIST_ROOT. It exists if meson.version() >= 0.58.0.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 8 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 5f636ff..ab1aee0 100644
--- a/meson.build
+++ b/meson.build
@@ -220,6 +220,9 @@ sigcxxconfig_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('cmake')
subdir('MSVC_NMake')
subdir('sigc++')
@@ -228,22 +231,22 @@ subdir('tests')
subdir('docs/docs/reference')
subdir('docs/docs/manual')
-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,
project_source_root,
)
# Add build scripts to the distribution directory, and delete .gitignore
- # files and an empty $MESON_DIST_ROOT/build/ directory.
+ # files and an empty $MESON_PROJECT_DIST_ROOT/build/ directory.
meson.add_dist_script(
python3.path(), dist_build_scripts,
project_source_root,
'untracked' / 'build_scripts',
)
-else
- # This is a subproject.
+endif
+
+if meson.is_subproject()
sigcxx_dep = declare_dependency(
dependencies: sigcxx_own_dep,
variables: {