File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -126,6 +126,10 @@ func xcodeProject(
126126 // paths so that all the products can be found.
127127 projectSettings. common. DYLIB_INSTALL_NAME_BASE = " @rpath "
128128
129+ // Set the `Xcode` build preset in Swift to let code conditionalize on
130+ // being built in Xcode.
131+ projectSettings. common. OTHER_SWIFT_FLAGS = [ " $(inherited) " , " -DXcode " ]
132+
129133 // Add any additional compiler and linker flags the user has specified.
130134 if !options. flags. cCompilerFlags. isEmpty {
131135 projectSettings. common. OTHER_CFLAGS = options. flags. cCompilerFlags
@@ -134,12 +138,9 @@ func xcodeProject(
134138 projectSettings. common. OTHER_LDFLAGS = options. flags. linkerFlags
135139 }
136140 if !options. flags. swiftCompilerFlags. isEmpty {
137- projectSettings. common. OTHER_SWIFT_FLAGS = options. flags. swiftCompilerFlags
141+ projectSettings. common. OTHER_SWIFT_FLAGS + = options. flags. swiftCompilerFlags
138142 }
139143
140- // Also set the `Xcode` build preset in Swift to let code conditionalize on
141- // being built in Xcode.
142- projectSettings. common. OTHER_SWIFT_FLAGS += [ " -DXcode " ]
143144 projectSettings. common. MACOSX_DEPLOYMENT_TARGET = " 10.10 "
144145
145146 // Prevent Xcode project upgrade warnings.
You can’t perform that action at this time.
0 commit comments