-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathPackage.swift
40 lines (38 loc) · 1.52 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
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "GreatfireEnvoy",
platforms: [.iOS(.v13), .macOS(.v11)],
products: [
.library(name: "GreatfireEnvoy", targets: ["GreatfireEnvoy"]),
],
dependencies: [
.package(url: "https://github.com/greatfire/SwiftyCurl", from: "0.4.0"),
],
targets: [
.binaryTarget(
name: "IEnvoyProxy",
url: "https://github.com/stevenmcdonald/IEnvoyProxy/releases/download/e3.0.0/IEnvoyProxy.xcframework.zip",
// swift package compute-checksum IEnvoyProxy.xcframework.zip
checksum: "940adeb9721048e590f01a6bd652412756715c197f6a82c14729785c2c346b4a"),
.target(
name: "GreatfireEnvoy",
dependencies: [
"IEnvoyProxy",
.product(name: "SwiftyCurl", package: "SwiftyCurl"),
],
path: "apple",
exclude: ["Example", "Tests"],
cSettings: [.define("USE_CURL", to: "1")],
swiftSettings: [.define("USE_CURL")],
// Needed for IEnvoyProxy, but not allowed in `.binaryTarget`. Hrgrml. But works this way.
linkerSettings: [.linkedLibrary("resolv")]),
.testTarget(
name: "GreatfireEnvoyTests",
dependencies: ["GreatfireEnvoy"],
path: "apple",
exclude: ["Example", "Sources"]),
],
swiftLanguageModes: [.v5]
)