mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This was originally a separate library since it was copied directly from the legacy SwiftPM library. However it's since been changed a bunch, and ought to be able leverage SwiftXcodeGen utilities such as RelativePath. Fold it into SwiftXcodeGen. I considered splitting out the utility code from SwiftXcodeGen into a new library, but unfortunately that currently regresses performance (even with max CMO). The module organization doesn't really currently matter since we don't expose any products.
52 lines
1.5 KiB
Swift
52 lines
1.5 KiB
Swift
// swift-tools-version: 5.8
|
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
|
|
|
import PackageDescription
|
|
import class Foundation.ProcessInfo
|
|
|
|
let package = Package(
|
|
name: "swift-xcodegen",
|
|
platforms: [.macOS(.v13)],
|
|
targets: [
|
|
.target(
|
|
name: "SwiftXcodeGen",
|
|
dependencies: [
|
|
.product(name: "ArgumentParser", package: "swift-argument-parser"),
|
|
.product(name: "SwiftOptions", package: "swift-driver"),
|
|
],
|
|
exclude: [
|
|
"Xcodeproj/README.md",
|
|
],
|
|
swiftSettings: [
|
|
.enableExperimentalFeature("StrictConcurrency")
|
|
]
|
|
),
|
|
.executableTarget(
|
|
name: "swift-xcodegen",
|
|
dependencies: [
|
|
.product(name: "ArgumentParser", package: "swift-argument-parser"),
|
|
"SwiftXcodeGen"
|
|
],
|
|
swiftSettings: [
|
|
.enableExperimentalFeature("StrictConcurrency")
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "SwiftXcodeGenTest",
|
|
dependencies: ["SwiftXcodeGen"]
|
|
)
|
|
]
|
|
)
|
|
|
|
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
|
|
package.dependencies += [
|
|
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.4.0"),
|
|
.package(url: "https://github.com/swiftlang/swift-driver", branch: "main"),
|
|
]
|
|
} else {
|
|
package.dependencies += [
|
|
.package(path: "../../../swift-argument-parser"),
|
|
.package(path: "../../../swift-driver"),
|
|
]
|
|
}
|