forked from Bouke/HAP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
59 lines (55 loc) · 2.21 KB
/
Package.swift
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
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "HAP",
platforms: [
.macOS(.v11),
],
products: [
.library(name: "HAP", targets: ["HAP"]),
.executable(name: "hap-demo", targets: ["HAPDemo"]),
],
dependencies: [
.package(url: "https://github.com/Bouke/SRP.git", from: "3.2.0"),
.package(url: "https://github.com/crossroadlabs/Regex.git", from: "1.1.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.13.0"),
.package(url: "https://github.com/apple/swift-log.git", Version("0.0.0") ..< Version("2.0.0")),
.package(url: "https://github.com/apple/swift-crypto.git", from: "1.1.0"),
],
targets: [
.target(name: "CQRCode", exclude: ["LICENSE.txt"]),
.target(name: "COperatingSystem", exclude: ["LICENSE"]),
.target(name: "HTTP",
dependencies: [
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
.product(name: "NIOFoundationCompat", package: "swift-nio"),
"COperatingSystem",
],
exclude: ["LICENSE"]),
.target(name: "HAP",
dependencies: [
"SRP",
.product(name: "Logging", package: "swift-log"),
"Regex",
"CQRCode",
"HTTP",
.product(name: "Crypto", package: "swift-crypto"),
],
exclude: ["Base/Predefined/README"]),
.target(name: "HAPDemo",
dependencies: [
"HAP",
.product(name: "Logging", package: "swift-log")
]),
.testTarget(name: "HAPTests", dependencies: ["HAP"]),
]
)
#if os(macOS)
package.products.append(.executable(name: "hap-update", targets: ["HAPInspector"]))
package.targets.append(.target(name: "HAPInspector"))
#endif
#if os(Linux)
package.dependencies.append(.package(url: "https://github.com/Bouke/NetService.git", from: "0.7.0"))
package.targets.first(where: { $0.name == "HAP" })!.dependencies.append("NetService")
#endif