Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down