-
Notifications
You must be signed in to change notification settings - Fork 55
/
Package.swift
44 lines (41 loc) · 1.27 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
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
/// In order to keep Linux comatibility we leave the source based target for Linux.
/// Apple platforms will use the binary target in order to be compatible with binary dependency in MapboxSDK stack.
#if canImport(Darwin)
let targets: [Target] = [
.binaryTarget(
name: "Turf",
url: "https://github.com/mapbox/turf-swift/releases/download/v4.0.0-beta.1/Turf.xcframework.zip",
checksum: "37f2ed8a5485fe295b9ca8faf63ae55b8cebed50af7e9aaa0aac0c5903b23295"
)
]
#else
let targets: [Target] = [
.target(
name: "Turf",
dependencies: [],
exclude: ["Info.plist"]
),
.testTarget(
name: "TurfTests",
dependencies: ["Turf"],
exclude: ["Info.plist", "Fixtures/simplify"],
resources: [
.process("Fixtures"),
],
swiftSettings: [.define("SPM_TESTING")]
)
]
#endif
let package = Package(
name: "Turf",
platforms: [
.macOS(.v10_13), .iOS(.v11), .watchOS(.v4), .tvOS(.v11), .custom("visionos", versionString: "1.0")
],
products: [
.library(name: "Turf", targets: ["Turf"]),
],
targets: targets
)