aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2022-03-31 18:13:21 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2022-03-31 18:13:21 +0300
commit1a8d72cc41214b91ea51ca153c81ad38ae99719f (patch)
tree0e86b2899a2d479887c057e276d3bc32c2c7a401
parent31a22009389a3af59403a5f86d22d3d64a0ea387 (diff)
downloadmeson-xcodeminor.zip
meson-xcodeminor.tar.gz
meson-xcodeminor.tar.bz2
Handle same Framework multiple times in Xcode.xcodeminor
-rw-r--r--mesonbuild/backend/xcodebackend.py6
1 files 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)