[gtkmm/gtkmm-3-24] 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: [gtkmm/gtkmm-3-24] Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
- Date: Wed, 5 May 2021 18:02:09 +0000 (UTC)
commit 11f912dc8396a5e04b84dc34b24d432cf713a5b6
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed May 5 19:08:55 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.
docs/reference/meson.build | 6 +++---
gdk/gdkmm/meson.build | 6 +++---
gtk/gtkmm/meson.build | 5 ++---
meson.build | 11 +++++++----
4 files changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 4e65bc42..b0b714ac 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -3,7 +3,8 @@
# Input: built_files_root, project_source_root, gdkmm_pcname, gtkmm_pcname,
# gdkmm_hg_ccg_basenames, gtkmm_hg_ccg_basenames, build_documentation,
# gdkmm_extra_h_files, gtkmm_extra_h_files, gdkmm_built_h_file_targets,
-# gtkmm_built_h_file_targets, install_datadir, python3, doc_reference_py
+# gtkmm_built_h_file_targets, install_datadir, python3, doc_reference_py,
+# can_add_dist_script
# Output: install_docdir, install_devhelpdir, tag_file
tag_file_modules = [
@@ -161,9 +162,8 @@ endforeach
install_data(image_files, install_dir: install_image_docdir)
-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/gdk/gdkmm/meson.build b/gdk/gdkmm/meson.build
index 9c7efa7b..1b422bf9 100644
--- a/gdk/gdkmm/meson.build
+++ b/gdk/gdkmm/meson.build
@@ -4,7 +4,8 @@
# generate_binding_py, m4_files, gtkmm_libversion, install_includedir,
# python3, gdkmm_rc, dummy_header_py, gmmproc_dir, build_shared_libs_directly,
# build_deprecated_api, gmmproc_extra_m4_dirs, is_host_windows,
-# gdkmm_extra_gendef_cpp_args, gdkmm_libname, macos_darwin_versions
+# gdkmm_extra_gendef_cpp_args, gdkmm_libname, macos_darwin_versions,
+# can_add_dist_script
# Output: gdkmm_hg_ccg_basenames, gdkmm_extra_h_files, built_files_root,
# gdkmm_built_h_file_targets, gdkmm_used_built_h_file_targets, gdkmm_own_dep
@@ -280,9 +281,8 @@ meson.add_install_script(
gdkmm_used_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/gtk/gtkmm/meson.build b/gtk/gtkmm/meson.build
index 5fc22d59..4d89f97f 100644
--- a/gtk/gtkmm/meson.build
+++ b/gtk/gtkmm/meson.build
@@ -5,7 +5,7 @@
# python3, gtkmm_rc, dummy_header_py, gmmproc_dir, build_shared_libs_directly,
# build_deprecated_api, build_x11_api, gmmproc_extra_m4_dirs, is_host_windows,
# gdkmm_library, gdkmm_used_built_h_file_targets, gtkmm_extra_gendef_cpp_args,
-# gtkmm_libname, macos_darwin_versions
+# gtkmm_libname, macos_darwin_versions, can_add_dist_script
# Output: gtkmm_hg_ccg_basenames, gtkmm_extra_h_files, built_files_root,
# gtkmm_built_h_file_targets, gtkmm_own_dep
@@ -549,9 +549,8 @@ meson.add_install_script(
gtkmm_used_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/meson.build b/meson.build
index 1153b243..ade802d9 100644
--- a/meson.build
+++ b/meson.build
@@ -342,6 +342,9 @@ if is_msvc
gui_app_ldflags += '-entry:mainCRTStartup'
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('tools/extra_defs_gen')
subdir('MSVC_NMake/gendef')
subdir('gdk')
@@ -354,9 +357,8 @@ subdir('tests')
subdir('demos/gtk-demo')
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,
@@ -377,8 +379,9 @@ if not meson.is_subproject()
'untracked' / 'build_scripts',
dont_distribute,
)
-else
- # This is a subproject.
+endif
+
+if meson.is_subproject()
gdkmm_dep = declare_dependency(
dependencies: gdkmm_own_dep,
variables: {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]