diff --git a/Sources/Xcodeproj/generate().swift b/Sources/Xcodeproj/generate.swift similarity index 100% rename from Sources/Xcodeproj/generate().swift rename to Sources/Xcodeproj/generate.swift diff --git a/Sources/Xcodeproj/pbxproj().swift b/Sources/Xcodeproj/pbxproj.swift similarity index 99% rename from Sources/Xcodeproj/pbxproj().swift rename to Sources/Xcodeproj/pbxproj.swift index 36b8d85bc34..e4f84c5f061 100644 --- a/Sources/Xcodeproj/pbxproj().swift +++ b/Sources/Xcodeproj/pbxproj.swift @@ -126,6 +126,10 @@ func xcodeProject( // paths so that all the products can be found. projectSettings.common.DYLIB_INSTALL_NAME_BASE = "@rpath" + // Set the `Xcode` build preset in Swift to let code conditionalize on + // being built in Xcode. + projectSettings.common.OTHER_SWIFT_FLAGS = ["$(inherited)", "-DXcode"] + // Add any additional compiler and linker flags the user has specified. if !options.flags.cCompilerFlags.isEmpty { projectSettings.common.OTHER_CFLAGS = options.flags.cCompilerFlags @@ -134,12 +138,9 @@ func xcodeProject( projectSettings.common.OTHER_LDFLAGS = options.flags.linkerFlags } if !options.flags.swiftCompilerFlags.isEmpty { - projectSettings.common.OTHER_SWIFT_FLAGS = options.flags.swiftCompilerFlags + projectSettings.common.OTHER_SWIFT_FLAGS += options.flags.swiftCompilerFlags } - // Also set the `Xcode` build preset in Swift to let code conditionalize on - // being built in Xcode. - projectSettings.common.OTHER_SWIFT_FLAGS += ["-DXcode"] projectSettings.common.MACOSX_DEPLOYMENT_TARGET = "10.10" // Prevent Xcode project upgrade warnings.