forked from weichsel/ZIPFoundation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
31 lines (29 loc) · 1.02 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
// swift-tools-version:5.9
import PackageDescription
#if canImport(Compression)
let targets: [Target] = [
.target(name: "ReadiumZIPFoundation",
path: "Sources/ZIPFoundation",
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]),
.testTarget(name: "ReadiumZIPFoundationTests", dependencies: ["ReadiumZIPFoundation"])
]
#else
let targets: [Target] = [
.systemLibrary(name: "CZLib", pkgConfig: "zlib", providers: [.brew(["zlib"]), .apt(["zlib"])]),
.target(name: "ZIPFoundation", dependencies: ["CZLib"], cSettings: [.define("_GNU_SOURCE", to: "1")]),
.testTarget(name: "ZIPFoundationTests", dependencies: ["ZIPFoundation"])
]
#endif
let package = Package(
name: "ReadiumZIPFoundation",
platforms: [
.macOS(.v10_13), .iOS(.v13), .tvOS(.v12), .watchOS(.v4), .visionOS(.v1)
],
products: [
.library(name: "ReadiumZIPFoundation", targets: ["ReadiumZIPFoundation"])
],
targets: targets,
swiftLanguageVersions: [.v4, .v4_2, .v5]
)