2018-12-14 20:34:08 +08:00
|
|
|
// swift-tools-version:5.0
|
2017-04-20 19:13:14 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This source file is part of the SwiftNIO open source project
|
|
|
|
//
|
|
|
|
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
|
|
|
|
// Licensed under Apache License v2.0
|
|
|
|
//
|
|
|
|
// See LICENSE.txt for license information
|
|
|
|
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
import PackageDescription
|
|
|
|
|
|
|
|
var targets: [PackageDescription.Target] = [
|
2019-01-21 23:51:12 +08:00
|
|
|
.target(name: "_NIO1APIShims",
|
2019-02-12 19:11:45 +08:00
|
|
|
dependencies: ["NIO", "NIOHTTP1", "NIOTLS", "NIOFoundationCompat"]),
|
2017-04-20 19:13:14 +08:00
|
|
|
.target(name: "NIO",
|
|
|
|
dependencies: ["CNIOLinux",
|
|
|
|
"CNIODarwin",
|
|
|
|
"NIOConcurrencyHelpers",
|
|
|
|
"CNIOAtomics",
|
2018-03-14 00:24:54 +08:00
|
|
|
"CNIOSHA1"]),
|
2017-04-20 19:13:14 +08:00
|
|
|
.target(name: "NIOFoundationCompat", dependencies: ["NIO"]),
|
2018-03-14 00:24:54 +08:00
|
|
|
.target(name: "CNIOAtomics", dependencies: []),
|
|
|
|
.target(name: "CNIOSHA1", dependencies: []),
|
2017-04-20 19:13:14 +08:00
|
|
|
.target(name: "CNIOLinux", dependencies: []),
|
|
|
|
.target(name: "CNIODarwin", dependencies: []),
|
|
|
|
.target(name: "NIOConcurrencyHelpers",
|
|
|
|
dependencies: ["CNIOAtomics"]),
|
|
|
|
.target(name: "NIOHTTP1",
|
|
|
|
dependencies: ["NIO", "NIOConcurrencyHelpers", "CNIOHTTPParser", "CNIOZlib"]),
|
|
|
|
.target(name: "NIOEchoServer",
|
|
|
|
dependencies: ["NIO", "NIOConcurrencyHelpers"]),
|
|
|
|
.target(name: "NIOEchoClient",
|
|
|
|
dependencies: ["NIO", "NIOConcurrencyHelpers"]),
|
|
|
|
.target(name: "NIOHTTP1Server",
|
|
|
|
dependencies: ["NIO", "NIOHTTP1", "NIOConcurrencyHelpers"]),
|
|
|
|
.target(name: "CNIOHTTPParser"),
|
2019-01-08 04:25:37 +08:00
|
|
|
.target(name: "CNIOZlib",
|
|
|
|
dependencies: [],
|
|
|
|
linkerSettings: [
|
|
|
|
.linkedLibrary("z")
|
|
|
|
]),
|
2017-04-20 19:13:14 +08:00
|
|
|
.target(name: "NIOTLS", dependencies: ["NIO"]),
|
|
|
|
.target(name: "NIOChatServer",
|
|
|
|
dependencies: ["NIO", "NIOConcurrencyHelpers"]),
|
|
|
|
.target(name: "NIOChatClient",
|
|
|
|
dependencies: ["NIO", "NIOConcurrencyHelpers"]),
|
2018-03-14 00:24:54 +08:00
|
|
|
.target(name: "NIOWebSocket",
|
|
|
|
dependencies: ["NIO", "NIOHTTP1", "CNIOSHA1"]),
|
|
|
|
.target(name: "NIOWebSocketServer",
|
|
|
|
dependencies: ["NIO", "NIOHTTP1", "NIOWebSocket"]),
|
2018-05-11 13:22:24 +08:00
|
|
|
.target(name: "NIOPerformanceTester",
|
|
|
|
dependencies: ["NIO", "NIOHTTP1", "NIOFoundationCompat"]),
|
2018-09-24 17:24:09 +08:00
|
|
|
.target(name: "NIOMulticastChat",
|
|
|
|
dependencies: ["NIO"]),
|
2017-04-20 19:13:14 +08:00
|
|
|
.testTarget(name: "NIOTests",
|
|
|
|
dependencies: ["NIO", "NIOFoundationCompat"]),
|
|
|
|
.testTarget(name: "NIOConcurrencyHelpersTests",
|
|
|
|
dependencies: ["NIOConcurrencyHelpers"]),
|
|
|
|
.testTarget(name: "NIOHTTP1Tests",
|
|
|
|
dependencies: ["NIOHTTP1", "NIOFoundationCompat"]),
|
|
|
|
.testTarget(name: "NIOTLSTests",
|
|
|
|
dependencies: ["NIO", "NIOTLS", "NIOFoundationCompat"]),
|
2018-03-14 00:24:54 +08:00
|
|
|
.testTarget(name: "NIOWebSocketTests",
|
|
|
|
dependencies: ["NIO", "NIOWebSocket"]),
|
2017-04-20 19:13:14 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
let package = Package(
|
|
|
|
name: "swift-nio",
|
|
|
|
products: [
|
|
|
|
.executable(name: "NIOEchoServer", targets: ["NIOEchoServer"]),
|
|
|
|
.executable(name: "NIOEchoClient", targets: ["NIOEchoClient"]),
|
|
|
|
.executable(name: "NIOChatServer", targets: ["NIOChatServer"]),
|
|
|
|
.executable(name: "NIOChatClient", targets: ["NIOChatClient"]),
|
|
|
|
.executable(name: "NIOHTTP1Server", targets: ["NIOHTTP1Server"]),
|
2018-03-14 00:24:54 +08:00
|
|
|
.executable(name: "NIOWebSocketServer",
|
|
|
|
targets: ["NIOWebSocketServer"]),
|
2018-05-11 13:22:24 +08:00
|
|
|
.executable(name: "NIOPerformanceTester",
|
|
|
|
targets: ["NIOPerformanceTester"]),
|
2018-09-24 17:24:09 +08:00
|
|
|
.executable(name: "NIOMulticastChat", targets: ["NIOMulticastChat"]),
|
2017-04-20 19:13:14 +08:00
|
|
|
.library(name: "NIO", targets: ["NIO"]),
|
2019-01-21 23:51:12 +08:00
|
|
|
.library(name: "_NIO1APIShims", targets: ["_NIO1APIShims"]),
|
2017-04-20 19:13:14 +08:00
|
|
|
.library(name: "NIOTLS", targets: ["NIOTLS"]),
|
|
|
|
.library(name: "NIOHTTP1", targets: ["NIOHTTP1"]),
|
|
|
|
.library(name: "NIOConcurrencyHelpers", targets: ["NIOConcurrencyHelpers"]),
|
2018-03-02 09:52:07 +08:00
|
|
|
.library(name: "NIOFoundationCompat", targets: ["NIOFoundationCompat"]),
|
2018-03-14 00:24:54 +08:00
|
|
|
.library(name: "NIOWebSocket", targets: ["NIOWebSocket"]),
|
2017-04-20 19:13:14 +08:00
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
],
|
|
|
|
targets: targets
|
|
|
|
)
|