aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-03-09 15:46:05 -0800
committerEli Schwartz <eschwartz93@gmail.com>2022-08-18 21:57:36 -0400
commit9bd3c1957dcecf4bec5823d9627584029642768e (patch)
tree2e4aee5157dfcbedf03bcd7b1f8e5a493d08338a
parent2fb0c0e4d8c7f325ae683c1cc8a5664b32585b33 (diff)
downloadmeson-9bd3c1957dcecf4bec5823d9627584029642768e.zip
meson-9bd3c1957dcecf4bec5823d9627584029642768e.tar.gz
meson-9bd3c1957dcecf4bec5823d9627584029642768e.tar.bz2
modules/pkgconfig: Fix code to handle CustomTarget and CustomTargetIndex
-rw-r--r--mesonbuild/modules/pkgconfig.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index 87cacf8..6e41317 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -297,16 +297,17 @@ class DependenciesHelper:
def remove_dups(self) -> None:
# Set of ids that have already been handled and should not be added any more
- exclude: T.Set[build.Target] = set()
+ exclude: T.Set[str] = set()
# We can't just check if 'x' is excluded because we could have copies of
# the same SharedLibrary object for example.
def _ids(x: T.Union[str, build.CustomTarget, build.CustomTargetIndex, build.StaticLibrary]) -> T.Iterable[str]:
- if isinstance(x, build.Target):
+ if isinstance(x, str):
+ yield x
+ else:
if x.get_id() in self.metadata:
yield self.metadata[x.get_id()].display_name
yield x.get_id()
- yield x
# Exclude 'x' in all its forms and return if it was already excluded
def _add_exclude(x: T.Union[str, build.CustomTarget, build.CustomTargetIndex, build.StaticLibrary]) -> bool: