forked from migueldeicaza/SwiftTerm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
93 lines (87 loc) · 2.24 KB
/
Package.swift
File metadata and controls
93 lines (87 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// swift-tools-version:5.9
import PackageDescription
#if os(Linux) || os(Windows)
let platformExcludes = ["Apple", "Mac", "iOS"]
#else
let platformExcludes: [String] = []
#endif
#if os(Windows)
let products: [Product] = [
.executable(name: "SwiftTermFuzz", targets: ["SwiftTermFuzz"]),
.library(
name: "SwiftTerm",
targets: ["SwiftTerm"]
),
]
let targets: [Target] = [
.target(
name: "SwiftTerm",
dependencies: [],
path: "Sources/SwiftTerm",
exclude: platformExcludes
),
.executableTarget (
name: "SwiftTermFuzz",
dependencies: ["SwiftTerm"],
path: "Sources/SwiftTermFuzz"
),
.testTarget(
name: "SwiftTermTests",
dependencies: ["SwiftTerm"],
path: "Tests/SwiftTermTests"
)
]
#else
let products: [Product] = [
.executable(name: "SwiftTermFuzz", targets: ["SwiftTermFuzz"]),
.executable(name: "termcast", targets: ["Termcast"]),
.library(
name: "SwiftTerm",
targets: ["SwiftTerm"]
),
]
let targets: [Target] = [
.target(
name: "SwiftTerm",
dependencies: [
.product(name: "Subprocess", package: "swift-subprocess", condition: .when(platforms: [.macOS, .linux]))
],
path: "Sources/SwiftTerm",
exclude: platformExcludes
),
.executableTarget (
name: "SwiftTermFuzz",
dependencies: ["SwiftTerm"],
path: "Sources/SwiftTermFuzz"
),
.executableTarget (
name: "Termcast",
dependencies: [
"SwiftTerm",
.product(name: "ArgumentParser", package: "swift-argument-parser")
],
path: "Sources/Termcast"
),
.testTarget(
name: "SwiftTermTests",
dependencies: ["SwiftTerm"],
path: "Tests/SwiftTermTests"
)
]
#endif
let package = Package(
name: "SwiftTerm",
platforms: [
.iOS(.v13),
.macOS(.v13),
.tvOS(.v13),
.visionOS(.v1)
],
products: products,
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
.package(url: "https://github.com/swiftlang/swift-subprocess", branch: "main")
],
targets: targets,
swiftLanguageVersions: [.v5]
)