-
Notifications
You must be signed in to change notification settings - Fork 13
/
Package.swift
124 lines (118 loc) · 3.07 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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// swift-tools-version:5.4
//
// Package.swift
// PotentCodables
//
// Copyright © 2019 Outfox, inc.
//
//
// Distributed under the MIT License, See LICENSE for details.
//
import PackageDescription
// Limit Float16 to x86_64 on macOS or Linux
#if swift(>=5.5)
let pcDeps: [Target.Dependency] = [
"BigInt",
.product(name: "Collections", package: "swift-collections"),
.byName(name: "Float16", condition: .when(platforms: [.macOS, .macCatalyst, .linux])),
.product(name: "Regex", package: "regex"),
]
#else
let pcDeps: [Target.Dependency] = [
"BigInt",
.product(name: "Collections", package: "swift-collections"),
"Float16",
.product(name: "Regex", package: "regex"),
]
#endif
let package = Package(
name: "PotentCodables",
platforms: [
.iOS(.v14),
.macOS(.v11),
.watchOS(.v7),
.tvOS(.v14),
],
products: [
.library(
name: "PotentCodables",
targets: ["PotentCodables", "PotentJSON", "PotentCBOR", "PotentASN1", "PotentYAML", "Cfyaml"]
),
],
dependencies: [
.package(url: "https://github.com/attaswift/BigInt.git", .upToNextMinor(from: "5.3.0")),
.package(url: "https://github.com/SusanDoggie/Float16.git", .upToNextMinor(from: "1.1.1")),
.package(url: "https://github.com/apple/swift-collections.git", .upToNextMinor(from: "1.0.4")),
.package(url: "https://github.com/sharplet/Regex.git", .upToNextMinor(from: "2.1.1"))
],
targets: [
.target(
name: "PotentCodables",
dependencies: pcDeps,
resources: [
.process("PotentCodables.docc")
]
),
.target(
name: "PotentJSON",
dependencies: [
"PotentCodables",
"BigInt",
.product(name: "Collections", package: "swift-collections")
]
),
.target(
name: "PotentCBOR",
dependencies: [
"PotentCodables",
"BigInt",
.product(name: "Collections", package: "swift-collections")
]
),
.target(
name: "PotentASN1",
dependencies: [
"PotentCodables",
"BigInt",
.product(name: "Collections", package: "swift-collections")
]
),
.target(
name: "Cfyaml",
sources: [
"src/lib/",
"src/util/",
"src/xxhash/"
],
cSettings: [
.headerSearchPath("."),
.headerSearchPath("include"),
.headerSearchPath("src/lib"),
.headerSearchPath("src/util"),
.headerSearchPath("src/valgrind"),
.headerSearchPath("src/xxhash"),
.define("HAVE_CONFIG_H")
]
),
.target(
name: "PotentYAML",
dependencies: [
"PotentCodables",
"BigInt",
"Cfyaml",
.product(name: "Collections", package: "swift-collections"),
.product(name: "Regex", package: "regex")
]
),
.testTarget(
name: "PotentCodablesTests",
dependencies: ["PotentCodables", "PotentJSON", "PotentCBOR", "PotentASN1", "PotentYAML"],
path: "./Tests"
)
]
)
#if swift(>=5.6)
package.dependencies.append(
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.1.0")
)
#endif