-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathPackage.swift
More file actions
89 lines (83 loc) · 2.61 KB
/
Package.swift
File metadata and controls
89 lines (83 loc) · 2.61 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
// swift-tools-version: 5.9
import Foundation
import PackageDescription
let package = Package(
name: "swift-timecode",
defaultLocalization: "en",
platforms: [
.macOS(.v10_13),
.iOS(.v12),
.tvOS(.v12),
.watchOS(.v4),
.visionOS(.v1)
],
products: [
.library(name: "SwiftTimecode", targets: ["SwiftTimecode"]),
.library(name: "SwiftTimecodeCore", type: .static, targets: ["SwiftTimecodeCore"])
],
dependencies: [
// used only for Dev tests, not part of regular unit tests
.package(url: "https://github.com/apple/swift-numerics", from: "1.1.1"),
.package(url: "https://github.com/orchetect/swift-testing-extensions", from: "0.3.0")
],
targets: [
.target(
name: "SwiftTimecode",
dependencies: ["SwiftTimecodeCore"]
),
.target(
name: "SwiftTimecodeCore",
dependencies: []
),
.testTarget(
name: "SwiftTimecodeCoreTests",
dependencies: [
"SwiftTimecodeCore",
.product(name: "Numerics", package: "swift-numerics"),
.product(name: "TestingExtensions", package: "swift-testing-extensions")
]
)
]
)
#if canImport(Darwin)
/// AV and UI targets are only compatible with Apple platforms.
package.products += [
.library(name: "SwiftTimecodeAV", targets: ["SwiftTimecodeAV"]),
.library(name: "SwiftTimecodeUI", targets: ["SwiftTimecodeUI"])
]
package.targets.first(where: { $0.name == "SwiftTimecode" })?.dependencies += [
"SwiftTimecodeAV",
"SwiftTimecodeUI"
]
package.targets += [
.target(
name: "SwiftTimecodeAV",
dependencies: ["SwiftTimecodeCore"]
),
.target(
name: "SwiftTimecodeUI",
dependencies: ["SwiftTimecodeCore"],
linkerSettings: [
.linkedFramework("SwiftUI", .when(platforms: [.macOS, .macCatalyst, .iOS, .tvOS, .watchOS, .visionOS]))
]
),
.testTarget(
name: "SwiftTimecodeAVTests",
dependencies: [
"SwiftTimecodeAV",
.product(name: "TestingExtensions", package: "swift-testing-extensions")
],
resources: [.copy("TestResource/Media Files")]
),
.testTarget(
name: "SwiftTimecodeUITests",
dependencies: [
"SwiftTimecodeUI",
.product(name: "TestingExtensions", package: "swift-testing-extensions")
],
linkerSettings: [
.linkedFramework("SwiftUI", .when(platforms: [.macOS, .macCatalyst, .iOS, .tvOS, .watchOS, .visionOS]))
]
)
]
#endif