Skip to content

Commit cb3ab81

Browse files
authored
Merge pull request #616 from mxcl/xcode-define-fix
Define SWIFT_PACKAGE in generated Xcode projects
2 parents e9bb837 + 1b158a8 commit cb3ab81

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/Xcodeproj/Module+PBXProj.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ extension Module {
288288
// At the moment, set the Swift version to 3 (we will need to make this dynamic), but for now this is necessary.
289289
buildSettings["SWIFT_VERSION"] = "3.0"
290290

291+
// Defined for regular `swift build` instantiations, so also should be defined here.
292+
buildSettings["SWIFT_ACTIVE_COMPILATION_CONDITIONS"] = "SWIFT_PACKAGE"
293+
291294
return buildSettings
292295
}
293296
}

0 commit comments

Comments
 (0)