[atkmm] Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atkmm] Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
- Date: Wed, 5 May 2021 14:58:42 +0000 (UTC)
commit e4ee05bdacc2d92edfb4632efbf4c8f13dbdfee2
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed May 5 16:50:53 2021 +0200
Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
Call add_dist_script() in a subproject, if meson.version() >= 0.58.0.
atk/atkmm/meson.build | 5 ++---
doc/reference/meson.build | 5 ++---
meson.build | 11 +++++++----
3 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/atk/atkmm/meson.build b/atk/atkmm/meson.build
index e9e4ca9..2eb4430 100644
--- a/atk/atkmm/meson.build
+++ b/atk/atkmm/meson.build
@@ -3,7 +3,7 @@
# Input: atkmm_build_dep, atkmm_pcname, maintainer_mode, project_source_root,
# generate_binding_py, m4_files, atkmm_libversion, install_includedir,
# python3, atkmm_rc, dummy_header_py, gmmproc_dir, msvc14x_toolset_ver,
-# macos_darwin_versions
+# macos_darwin_versions, can_add_dist_script
# Output: hg_ccg_basenames, extra_h_files, built_h_file_targets, built_files_root,
# atkmm_own_dep
@@ -216,9 +216,8 @@ meson.add_install_script(
hg_ccg_basenames
)
-if not meson.is_subproject()
+if can_add_dist_script
# Distribute built files.
- # (add_dist_script() is not allowed in a subproject)
meson.add_dist_script(
python3.path(), generate_binding_py, 'dist_built_files',
built_h_cc_dir,
diff --git a/doc/reference/meson.build b/doc/reference/meson.build
index 95ea53c..611cb87 100644
--- a/doc/reference/meson.build
+++ b/doc/reference/meson.build
@@ -2,7 +2,7 @@
# Input: built_files_root, project_source_root, atkmm_pcname, hg_ccg_basenames,
# extra_h_files, built_h_file_targets, install_datadir, python3,
-# doc_reference_py
+# doc_reference_py, can_add_dist_script
# Output: install_docdir, install_devhelpdir, tag_file
tag_file_modules = [
@@ -136,9 +136,8 @@ meson.add_install_script(
docinstall_flags
)
-if not meson.is_subproject()
+if can_add_dist_script
# Distribute built files and files copied by mm-common-get.
- # (add_dist_script() is not allowed in a subproject)
meson.add_dist_script(
python3.path(), doc_reference_py, 'dist_doc',
doctool_dir,
diff --git a/meson.build b/meson.build
index 82452aa..c720b4e 100644
--- a/meson.build
+++ b/meson.build
@@ -212,15 +212,17 @@ if is_msvc
endforeach
endif
+# 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('codegen/extradefs')
subdir('atk')
subdir('MSVC_NMake/atkmm')
subdir('atk/atkmm')
subdir('doc/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,
@@ -232,8 +234,9 @@ if not meson.is_subproject()
project_source_root,
'untracked' / 'build_scripts',
)
-else
- # This is a subproject.
+endif
+
+if meson.is_subproject()
atkmm_dep = declare_dependency(
dependencies: atkmm_own_dep,
variables: {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]