Skip to content

Commit

Permalink
Bump swift-tools-version to 5.9 for visionOS support
Browse files Browse the repository at this point in the history
  • Loading branch information
weichsel committed Aug 16, 2023
1 parent 35c4759 commit 22ed01e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.0
// swift-tools-version:5.9
import PackageDescription

#if canImport(Compression)
Expand Down
2 changes: 1 addition & 1 deletion [email protected]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// swift-tools-version:4.0
import PackageDescription

#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
#if os(macOS) || os(iOS) || os(tvOS) || os(visionOS) || os(watchOS)
let dependencies: [Package.Dependency] = []
#else
let dependencies: [Package.Dependency] = [.package(url: "https://github.com/IBM-Swift/CZlib.git", .exact("0.1.2"))]
Expand Down
27 changes: 27 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// swift-tools-version:5.0
import PackageDescription

#if canImport(Compression)
let targets: [Target] = [
.target(name: "ZIPFoundation"),
.testTarget(name: "ZIPFoundationTests", dependencies: ["ZIPFoundation"])
]
#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: "ZIPFoundation",
platforms: [
.macOS(.v10_11), .iOS(.v9), .tvOS(.v9), .watchOS(.v2)
],
products: [
.library(name: "ZIPFoundation", targets: ["ZIPFoundation"])
],
targets: targets,
swiftLanguageVersions: [.v4, .v4_2, .v5]
)

0 comments on commit 22ed01e

Please sign in to comment.