diff options
| author | Florian "sp1rit" <sp1rit@disroot.org> | 2025-06-11 19:10:12 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-06-23 19:59:53 +0300 |
| commit | fea9f6918a6647430f4e22ca908f074b3e93e489 (patch) | |
| tree | 102087d670e2f9b5145bccdf7ac84f1c3c10f838 /mesonbuild/dependencies | |
| parent | 19d3e4dc30bd3210eb85e29a538ad1606adef1bc (diff) | |
| download | meson-fea9f6918a6647430f4e22ca908f074b3e93e489.tar.gz | |
vala: Also add --target-glib if glib is built as subproject
Previously, meson would only check if glib was part of
target.external_dependencies and add --target-glib appropriately. This
however had the downside of meson not adding --target-glib if glib was
included as a subproject, potentially breaking otherwise builds.
Instead of checking external_dependencies, check target.added_deps for
an occurrence of 'glib-2.0' and then pick the appropriate codepath
(either from the external dependency based on version_reqs or for the
internal dependency based on the actual version, potentially downgraded
to the latest release version)
Related-to: #14694
Diffstat (limited to 'mesonbuild/dependencies')
| -rw-r--r-- | mesonbuild/dependencies/base.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 38bfc0822..732bae544 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -143,6 +143,11 @@ class Dependency(HoldableObject): def is_built(self) -> bool: return False + def is_named(self) -> bool: + if self.name is None: + return False + return self.name != f'dep{self._id}' + def summary_value(self) -> T.Union[str, mlog.AnsiDecorator, mlog.AnsiText]: if not self.found(): return mlog.red('NO') |
