diff options
| author | Xavier Claessens <xavier.claessens@collabora.com> | 2020-11-17 10:22:03 -0500 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2021-12-22 08:04:08 +0530 |
| commit | 95a4c6a62a925fc888e7c07ae3d9937c87e1c759 (patch) | |
| tree | 2cdaceb586e019c60316995c1504e5d45b36385a /mesonbuild/modules/pkgconfig.py | |
| parent | ee0baa97cd0411e15bd8f47e3874f217887d0a7a (diff) | |
| download | meson-95a4c6a62a925fc888e7c07ae3d9937c87e1c759.tar.gz | |
pkgconfig: Fix linking to a custom target
When generating pkgconfig file for a library that links to an
uninstalled static library built by custom_target() Meson was crashing
when trying to access some attributes that does not exist on that class.
Also fix is_internal() implementation, it only really make sense on a
CustomTargetIndex or if CustomTarget has only a single output.
Diffstat (limited to 'mesonbuild/modules/pkgconfig.py')
| -rw-r--r-- | mesonbuild/modules/pkgconfig.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index 4a0b39e81..6c5d347c3 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -183,7 +183,8 @@ class DependenciesHelper: # lists in case a library is link_with and link_whole at the same time. # See remove_dups() below. self.link_whole_targets.append(t) - self._add_lib_dependencies(t.link_targets, t.link_whole_targets, t.external_deps, public) + if isinstance(t, build.BuildTarget): + self._add_lib_dependencies(t.link_targets, t.link_whole_targets, t.external_deps, public) def add_version_reqs(self, name, version_reqs): if version_reqs: |
