diff --git a/pylib/gyp/generator/xcode.py b/pylib/gyp/generator/xcode.py index 8bc22bed..23571086 100644 --- a/pylib/gyp/generator/xcode.py +++ b/pylib/gyp/generator/xcode.py @@ -499,7 +499,7 @@ def AddSourceToTarget(source, type, pbxp, xct): # of "sources" as things to compile and "libraries" (or "frameworks") as # things to link with. Adding an object file to an Xcode target's frameworks # phase works properly. - library_extensions = ['a', 'dylib', 'framework', 'o'] + library_extensions = ['a', 'dylib', 'framework', 'xcframework', 'o'] basename = posixpath.basename(source) (root, ext) = posixpath.splitext(basename) diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py index ca76187b..4de25f9f 100644 --- a/pylib/gyp/xcode_emulation.py +++ b/pylib/gyp/xcode_emulation.py @@ -1154,7 +1154,7 @@ def AddImplicitPostbuilds(self, configname, output, output_binary, return pre + postbuilds + post def _AdjustLibrary(self, library, config_name=None): - if library.endswith('.framework'): + if library.endswith('.framework') or library.endswith('.xcframework'): l = '-framework ' + os.path.splitext(os.path.basename(library))[0] else: m = self.library_re.match(library) diff --git a/pylib/gyp/xcodeproj_file.py b/pylib/gyp/xcodeproj_file.py index 19edcb07..9374add9 100644 --- a/pylib/gyp/xcodeproj_file.py +++ b/pylib/gyp/xcodeproj_file.py @@ -1531,6 +1531,7 @@ def __init__(self, properties=None, id=None, parent=None): 'xcconfig': 'text.xcconfig', 'xcdatamodel': 'wrapper.xcdatamodel', 'xcdatamodeld':'wrapper.xcdatamodeld', + 'xcframework': 'wrapper.xcframework', 'xib': 'file.xib', 'y': 'sourcecode.yacc', 'tbd': 'sourcecode.text-based-dylib-definition',