-
Notifications
You must be signed in to change notification settings - Fork 78
/
Package.swift
79 lines (77 loc) · 2.17 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// swift-tools-version:5.9
import PackageDescription
let package = Package(
name: "AMSMB2",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
.macCatalyst(.v13),
.tvOS(.v14),
.watchOS(.v6),
],
products: [
.library(
name: "AMSMB2",
type: .dynamic,
targets: ["AMSMB2"]
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-atomics.git", .upToNextMajor(from: "1.2.0")),
],
targets: [
.target(
name: "libsmb2",
path: "Dependencies/libsmb2",
exclude: [
"lib/CMakeLists.txt",
"lib/libsmb2.syms",
"lib/Makefile.am",
"lib/Makefile.AMIGA",
"lib/Makefile.AMIGA_AROS",
"lib/Makefile.AMIGA_OS3",
"lib/Makefile.PS3_PPU",
"lib/ps2",
],
sources: [
"lib",
],
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("include"),
.headerSearchPath("include/apple", .when(platforms: [.iOS, .macOS, .macCatalyst, .tvOS, .watchOS])),
.headerSearchPath("include/smb2"),
.headerSearchPath("lib"),
.define("_U_", to: "__attribute__((unused))"),
.define("HAVE_CONFIG_H", to: "1"),
],
linkerSettings: [
]
),
.target(
name: "AMSMB2",
dependencies: [
"libsmb2",
],
path: "AMSMB2"
),
.testTarget(
name: "AMSMB2Tests",
dependencies: [
"AMSMB2",
.product(name: "Atomics", package: "swift-atomics"),
],
path: "AMSMB2Tests"
),
],
swiftLanguageVersions: [.v5]
)
for target in package.targets {
var swiftSettings: [SwiftSetting] = [
.enableExperimentalFeature("StrictConcurrency=complete"),
]
#if swift(>=5.9)
swiftSettings.append(.enableUpcomingFeature("ExistentialAny"))
#endif
target.swiftSettings = swiftSettings
}