From a7356f6bf26f6f734e5d9293293498a668d35c6b Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 31 Mar 2022 18:13:21 +0300 Subject: Handle same Framework multiple times in Xcode. --- mesonbuild/backend/xcodebackend.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py index a5c6931..46f3b14 100644 --- a/mesonbuild/backend/xcodebackend.py +++ b/mesonbuild/backend/xcodebackend.py @@ -131,8 +131,8 @@ class PbxDict: self.items = [] def add_item(self, key, value, comment=''): - item = PbxDictItem(key, value, comment) assert key not in self.keys + item = PbxDictItem(key, value, comment) self.keys.add(key) self.items.append(item) @@ -601,7 +601,9 @@ class XCodeBackend(backends.Backend): if isinstance(dep, dependencies.AppleFrameworks): for f in dep.frameworks: fw_dict = PbxDict() - objects_dict.add_item(self.native_frameworks[f], fw_dict, f'{f}.framework in Frameworks') + fwkey = self.native_frameworks[f] + if fwkey not in objects_dict.keys: + objects_dict.add_item(fwkey, fw_dict, f'{f}.framework in Frameworks') fw_dict.add_item('isa', 'PBXBuildFile') fw_dict.add_item('fileRef', self.native_frameworks_fileref[f], f) -- cgit v1.1