Skip to content

Commit

Permalink
Re-add swift-nio-zlib-support for macOS builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMage committed Jun 4, 2018
1 parent e791f85 commit c12125b
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,23 @@
*/
import PackageDescription

var dependencies: [Package.Dependency] = [
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.0.2"),
.package(url: "https://github.com/kylef/Commander.git", from: "0.8.0")
]

var cGRPCDependencies: [Target.Dependency] = []
#if os(Linux)
#if !os(Linux)
// On Linux, Foundation links with openssl, so we'll need to use that instead of BoringSSL.
// See https://github.com/apple/swift-nio-ssl/issues/16#issuecomment-392705505 for details.
dependencies.append(.package(url: "https://github.com/apple/swift-nio-ssl-support.git", from: "1.0.0"))
#else
cGRPCDependencies.append("BoringSSL")
#endif

/*
* `swift-nio-zlib-support` uses `pkgConfig` to find `zlib` on
* non-Apple platforms. Details here:
* https://github.com/apple/swift-nio-zlib-support/issues/2#issuecomment-384681975
*
* This doesn't play well with Macports, so require it only for non-Apple
* platforms, until there is a better solution.
* Issue: https://github.com/grpc/grpc-swift/issues/220
*/
#if !os(macOS)
dependencies.append(.package(url: "https://github.com/apple/swift-nio-zlib-support.git", from: "1.0.0"))
#endif

let package = Package(
name: "SwiftGRPC",
products: [
.library(name: "SwiftGRPC", targets: ["SwiftGRPC"]),
],
dependencies: dependencies,
dependencies: [
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.0.2"),
.package(url: "https://github.com/kylef/Commander.git", from: "0.8.0"),
.package(url: "https://github.com/apple/swift-nio-zlib-support.git", from: "1.0.0")
],
targets: [
.target(name: "SwiftGRPC",
dependencies: ["CgRPC", "SwiftProtobuf"]),
Expand Down

0 comments on commit c12125b

Please sign in to comment.