194 lines
6.2 KiB
Swift
194 lines
6.2 KiB
Swift
// swift-tools-version:5.5
|
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "TunnelKit",
|
|
platforms: [
|
|
.iOS(.v15), .macOS(.v12)
|
|
],
|
|
products: [
|
|
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
|
.library(
|
|
name: "TunnelKit",
|
|
targets: ["TunnelKit"]
|
|
),
|
|
.library(
|
|
name: "TunnelKitOpenVPN",
|
|
targets: ["TunnelKitOpenVPN"]
|
|
),
|
|
.library(
|
|
name: "TunnelKitOpenVPNAppExtension",
|
|
targets: ["TunnelKitOpenVPNAppExtension"]
|
|
),
|
|
.library(
|
|
name: "TunnelKitWireGuard",
|
|
targets: ["TunnelKitWireGuard"]
|
|
),
|
|
.library(
|
|
name: "TunnelKitWireGuardAppExtension",
|
|
targets: ["TunnelKitWireGuardAppExtension"]
|
|
),
|
|
.library(
|
|
name: "TunnelKitLZO",
|
|
targets: ["TunnelKitLZO"]
|
|
)
|
|
],
|
|
dependencies: [
|
|
// Dependencies declare other packages that this package depends on.
|
|
// .package(url: /* package url */, from: "1.0.0"),
|
|
.package(url: "https://github.com/SwiftyBeaver/SwiftyBeaver", from: "1.9.0"),
|
|
.package(url: "https://github.com/passepartoutvpn/openssl-apple", from: "1.1.11700"),
|
|
// .package(name: "WireGuardKit", url: "https://git.zx2c4.com/wireguard-apple", .exact("1.0.15-26")),
|
|
.package(name: "WireGuardKit", url: "https://github.com/passepartoutvpn/wireguard-apple", .exact("1.0.17"))
|
|
// .package(name: "WireGuardKit", url: "https://github.com/passepartoutvpn/wireguard-apple", .revision("73d9152fa0cb661db0348a1ac11dbbf998422a50"))
|
|
// .package(name: "WireGuardKit", path: "../wireguard-apple")
|
|
],
|
|
targets: [
|
|
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
|
// Targets can depend on other targets in this package, and on products in packages this package depends on.
|
|
.target(
|
|
name: "TunnelKit",
|
|
dependencies: [
|
|
"TunnelKitCore",
|
|
"TunnelKitManager"
|
|
]
|
|
),
|
|
.target(
|
|
name: "TunnelKitCore",
|
|
dependencies: [
|
|
"__TunnelKitUtils",
|
|
"CTunnelKitCore",
|
|
"SwiftyBeaver"
|
|
]),
|
|
.target(
|
|
name: "TunnelKitManager",
|
|
dependencies: [
|
|
"SwiftyBeaver"
|
|
]),
|
|
.target(
|
|
name: "TunnelKitAppExtension",
|
|
dependencies: [
|
|
"TunnelKitCore"
|
|
]),
|
|
.target(
|
|
name: "TunnelKitOpenVPN",
|
|
dependencies: [
|
|
"TunnelKitOpenVPNCore",
|
|
"TunnelKitOpenVPNManager"
|
|
]),
|
|
//
|
|
.target(
|
|
name: "TunnelKitOpenVPNCore",
|
|
dependencies: [
|
|
"TunnelKitCore",
|
|
"CTunnelKitOpenVPNCore",
|
|
"CTunnelKitOpenVPNProtocol" // FIXME: remove dependency on TLSBox
|
|
]),
|
|
.target(
|
|
name: "TunnelKitOpenVPNManager",
|
|
dependencies: [
|
|
"TunnelKitManager",
|
|
"TunnelKitOpenVPNCore"
|
|
]),
|
|
.target(
|
|
name: "TunnelKitOpenVPNProtocol",
|
|
dependencies: [
|
|
"TunnelKitOpenVPNCore",
|
|
"CTunnelKitOpenVPNProtocol"
|
|
]),
|
|
.target(
|
|
name: "TunnelKitOpenVPNAppExtension",
|
|
dependencies: [
|
|
"TunnelKitAppExtension",
|
|
"TunnelKitOpenVPNCore",
|
|
"TunnelKitOpenVPNManager",
|
|
"TunnelKitOpenVPNProtocol"
|
|
]),
|
|
//
|
|
.target(
|
|
name: "TunnelKitWireGuard",
|
|
dependencies: [
|
|
"TunnelKitWireGuardCore",
|
|
"TunnelKitWireGuardManager"
|
|
]),
|
|
.target(
|
|
name: "TunnelKitWireGuardCore",
|
|
dependencies: [
|
|
"__TunnelKitUtils",
|
|
"WireGuardKit",
|
|
"SwiftyBeaver"
|
|
]),
|
|
.target(
|
|
name: "TunnelKitWireGuardManager",
|
|
dependencies: [
|
|
"TunnelKitManager",
|
|
"TunnelKitWireGuardCore"
|
|
]),
|
|
.target(
|
|
name: "TunnelKitWireGuardAppExtension",
|
|
dependencies: [
|
|
"TunnelKitWireGuardCore",
|
|
"TunnelKitWireGuardManager"
|
|
]),
|
|
.target(
|
|
name: "TunnelKitLZO",
|
|
dependencies: [],
|
|
exclude: [
|
|
"lib/COPYING",
|
|
"lib/Makefile",
|
|
"lib/README.LZO",
|
|
"lib/testmini.c"
|
|
]),
|
|
//
|
|
.target(
|
|
name: "CTunnelKitCore",
|
|
dependencies: []),
|
|
.target(
|
|
name: "CTunnelKitOpenVPNCore",
|
|
dependencies: []),
|
|
.target(
|
|
name: "CTunnelKitOpenVPNProtocol",
|
|
dependencies: [
|
|
"CTunnelKitCore",
|
|
"CTunnelKitOpenVPNCore",
|
|
"openssl-apple"
|
|
]),
|
|
.target(
|
|
name: "__TunnelKitUtils",
|
|
dependencies: []),
|
|
//
|
|
.testTarget(
|
|
name: "TunnelKitCoreTests",
|
|
dependencies: [
|
|
"TunnelKitCore"
|
|
],
|
|
exclude: [
|
|
"RandomTests.swift",
|
|
"RawPerformanceTests.swift",
|
|
"RoutingTests.swift"
|
|
]),
|
|
.testTarget(
|
|
name: "TunnelKitOpenVPNTests",
|
|
dependencies: [
|
|
"TunnelKitOpenVPNCore",
|
|
"TunnelKitOpenVPNAppExtension",
|
|
"TunnelKitLZO"
|
|
],
|
|
exclude: [
|
|
"DataPathPerformanceTests.swift",
|
|
"EncryptionPerformanceTests.swift"
|
|
],
|
|
resources: [
|
|
.process("Resources")
|
|
]),
|
|
.testTarget(
|
|
name: "TunnelKitLZOTests",
|
|
dependencies: [
|
|
"TunnelKitCore",
|
|
"TunnelKitLZO"
|
|
]),
|
|
]
|
|
)
|