a27dc674f1
This prevents linking against wg-go when 3rd-party application needs to use the WireGuardKit types from within the main bundle, therefore prevents wg-go from spinning off Golang threads where not applicable. Signed-off-by: Andrej Mihajlov <and@mullvad.net>
46 lines
1.2 KiB
Swift
46 lines
1.2 KiB
Swift
// swift-tools-version:5.3
|
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "WireGuardKit",
|
|
platforms: [
|
|
.macOS(.v10_14),
|
|
.iOS(.v12)
|
|
],
|
|
products: [
|
|
.library(name: "WireGuardKit", targets: ["WireGuardKit"]),
|
|
.library(name: "WireGuardKitTypes", targets: ["WireGuardKitTypes"])
|
|
],
|
|
dependencies: [],
|
|
targets: [
|
|
.target(
|
|
name: "WireGuardKit",
|
|
dependencies: ["WireGuardKitC", "WireGuardKitGo", "WireGuardKitTypes"]
|
|
),
|
|
.target(
|
|
name: "WireGuardKitTypes",
|
|
dependencies: ["WireGuardKitC"]
|
|
),
|
|
.target(
|
|
name: "WireGuardKitC",
|
|
dependencies: [],
|
|
publicHeadersPath: "."
|
|
),
|
|
.target(
|
|
name: "WireGuardKitGo",
|
|
dependencies: [],
|
|
exclude: [
|
|
"goruntime-boottime-over-monotonic.diff",
|
|
"go.mod",
|
|
"go.sum",
|
|
"api-apple.go",
|
|
"Makefile"
|
|
],
|
|
publicHeadersPath: ".",
|
|
linkerSettings: [.linkedLibrary("wg-go")]
|
|
)
|
|
]
|
|
)
|