2021-10-25 14:27:27 +00:00
|
|
|
// 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: [
|
|
|
|
.macOS(.v10_15), .iOS(.v12)
|
|
|
|
],
|
|
|
|
products: [
|
|
|
|
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
|
|
|
.library(
|
2021-10-29 21:21:52 +00:00
|
|
|
name: "TunnelKit",
|
|
|
|
targets: [
|
|
|
|
"TunnelKitCore",
|
|
|
|
"TunnelKitAppExtension",
|
|
|
|
"TunnelKitManager"
|
|
|
|
]
|
2021-10-25 14:27:27 +00:00
|
|
|
),
|
|
|
|
.library(
|
2021-10-29 21:21:52 +00:00
|
|
|
name: "TunnelKitIKE",
|
|
|
|
targets: ["TunnelKitIKE"]
|
2021-10-25 14:27:27 +00:00
|
|
|
),
|
|
|
|
.library(
|
|
|
|
name: "TunnelKitOpenVPN",
|
|
|
|
targets: ["TunnelKitOpenVPN"]
|
|
|
|
),
|
|
|
|
.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/keeshux/openssl-apple", from: "1.1.100")
|
|
|
|
],
|
|
|
|
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: "TunnelKitCore",
|
|
|
|
dependencies: [
|
2021-10-29 21:21:52 +00:00
|
|
|
"_TunnelKitUtils",
|
|
|
|
"_TunnelKitCoreObjC",
|
2021-10-25 14:27:27 +00:00
|
|
|
"SwiftyBeaver"]),
|
|
|
|
.target(
|
2021-10-29 21:21:52 +00:00
|
|
|
name: "_TunnelKitCoreObjC",
|
2021-10-25 14:27:27 +00:00
|
|
|
dependencies: []),
|
|
|
|
.target(
|
|
|
|
name: "TunnelKitAppExtension",
|
|
|
|
dependencies: [
|
|
|
|
"TunnelKitCore",
|
|
|
|
"SwiftyBeaver"]),
|
|
|
|
.target(
|
|
|
|
name: "TunnelKitManager",
|
|
|
|
dependencies: [
|
|
|
|
"TunnelKitCore"]),
|
|
|
|
.target(
|
2021-10-29 21:21:52 +00:00
|
|
|
name: "TunnelKitIKE",
|
2021-10-25 14:27:27 +00:00
|
|
|
dependencies: [
|
|
|
|
"TunnelKitCore",
|
|
|
|
"TunnelKitManager"]),
|
|
|
|
.target(
|
|
|
|
name: "TunnelKitOpenVPN",
|
|
|
|
dependencies: [
|
|
|
|
"TunnelKitCore",
|
2021-10-29 21:21:52 +00:00
|
|
|
"_TunnelKitOpenVPNObjC",
|
2021-10-25 14:27:27 +00:00
|
|
|
"TunnelKitAppExtension",
|
|
|
|
"TunnelKitManager"]),
|
|
|
|
.target(
|
2021-10-29 21:21:52 +00:00
|
|
|
name: "_TunnelKitOpenVPNObjC",
|
2021-10-25 14:27:27 +00:00
|
|
|
dependencies: [
|
2021-10-29 21:21:52 +00:00
|
|
|
"_TunnelKitCoreObjC",
|
2021-10-25 14:27:27 +00:00
|
|
|
"openssl-apple"]),
|
|
|
|
.target(
|
|
|
|
name: "TunnelKitLZO",
|
|
|
|
dependencies: [],
|
|
|
|
exclude: [
|
|
|
|
"lib/COPYING",
|
|
|
|
"lib/Makefile",
|
|
|
|
"lib/README.LZO"
|
|
|
|
]),
|
|
|
|
.target(
|
2021-10-29 21:21:52 +00:00
|
|
|
name: "_TunnelKitUtils",
|
2021-10-25 14:27:27 +00:00
|
|
|
dependencies: []),
|
|
|
|
.testTarget(
|
|
|
|
name: "TunnelKitCoreTests",
|
|
|
|
dependencies: [
|
2021-11-02 21:52:47 +00:00
|
|
|
"TunnelKitCore"
|
2021-10-25 14:27:27 +00:00
|
|
|
]),
|
|
|
|
.testTarget(
|
|
|
|
name: "TunnelKitOpenVPNTests",
|
|
|
|
dependencies: [
|
|
|
|
"TunnelKitOpenVPN",
|
2021-10-29 21:21:52 +00:00
|
|
|
"_TunnelKitOpenVPNObjC",
|
2021-10-25 14:27:27 +00:00
|
|
|
"TunnelKitLZO"
|
|
|
|
],
|
|
|
|
resources: [
|
|
|
|
.process("Resources")
|
|
|
|
]),
|
|
|
|
.testTarget(
|
|
|
|
name: "TunnelKitLZOTests",
|
|
|
|
dependencies: [
|
2021-11-02 21:52:47 +00:00
|
|
|
"TunnelKitCore",
|
2021-10-25 14:27:27 +00:00
|
|
|
"TunnelKitLZO"
|
|
|
|
]),
|
|
|
|
]
|
|
|
|
)
|