-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
65 lines (61 loc) · 1.3 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// swift-tools-version: 5.5
//
// SPDX-License-Identifier: Zlib
// Copyright Contributors to the Zlib project
import PackageDescription
let package = Package(
name: "zlib",
products: [
.library(
name: "ZLibC",
targets: ["ZLibC"]
),
.library(
name: "ZLib",
targets: ["ZLib"]
),
],
targets: [
.target(
name: "ZLibC",
path: "zlib",
exclude: [
"amiga",
"contrib",
"doc",
"examples",
"msdos",
"nintendods",
"old",
"os400",
"qnx",
"test",
"watcom",
"win32",
],
publicHeadersPath: ".",
cSettings: [
.headerSearchPath("."),
.define("HAVE_ATTRIBUTE_ALIGNED", to: "1"),
.define("WITH_GZFILEOP", to: "1"),
.define("HAVE_UNISTD_H", to: "1", .when(platforms: [.macOS, .iOS, .visionOS, .tvOS, .watchOS, .linux, .android])),
.define("Z_HAVE_STDARG_H", to: "1"),
],
cxxSettings: [
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),
.target(
name: "ZLib",
dependencies: [
.target(name: "ZLibC")
]
),
.testTarget(
name: "ZLibTests",
dependencies: [
.target(name: "ZLib")
]
),
]
)