Skip to content

Commit

Permalink
Added support for constructing Xcode project files that import XCFram…
Browse files Browse the repository at this point in the history
…eworks.

Bug: N/A
Change-Id: I7457406894f76110b834fe052d395be2c21ca39a
Reviewed-on: https://chromium-review.googlesource.com/c/external/gyp/+/4858505
Reviewed-by: Mark Mentovai <[email protected]>
  • Loading branch information
David Gatwood authored and markmentovai committed Sep 14, 2023
1 parent c6d8b9f commit a03d741
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pylib/gyp/generator/xcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pylib/gyp/xcode_emulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions pylib/gyp/xcodeproj_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit a03d741

Please sign in to comment.