forked from getsentry/sentry-cocoa
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage@swift-5.9.swift
More file actions
115 lines (109 loc) · 4.38 KB
/
Package@swift-5.9.swift
File metadata and controls
115 lines (109 loc) · 4.38 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// swift-tools-version:5.9
// This Package.swift for Swift 5.9 (and newer) fixes an issue on Xcode 26 when linking `SentrySwiftUI`.
// Don't remove this comment.
#if canImport(Darwin)
import Darwin.C
#elseif canImport(Glibc)
import Glibc
#elseif canImport(MSVCRT)
import MSVCRT
#endif
import PackageDescription
var products: [Product] = [
.library(name: "Sentry", targets: ["Sentry", "SentryCppHelper"]),
.library(name: "Sentry-Dynamic", targets: ["Sentry-Dynamic"]),
.library(name: "SentrySwiftUI", targets: ["Sentry", "SentrySwiftUI", "SentryCppHelper"])
]
var targets: [Target] = [
.binaryTarget(
name: "Sentry",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.55.1/Sentry.xcframework.zip",
checksum: "b1a12499982d941067bf405934bb3f08720613c4c273b1a729c8e499bac2080f" //Sentry-Static
),
.binaryTarget(
name: "Sentry-Dynamic",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.55.1/Sentry-Dynamic.xcframework.zip",
checksum: "f62e5e3b16a6738fd7530f261740ea5bbe124d7a60eb9dc42bbdea6aee5d8ac2" //Sentry-Dynamic
),
.binaryTarget(
name: "Sentry-Dynamic-WithARM64e",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.55.1/Sentry-Dynamic-WithARM64e.xcframework.zip",
checksum: "fc96c3a67111d7775aeffd6d3d03a0fa69957b13a6a5b61abd3f6309240c9fc6" //Sentry-Dynamic-WithARM64e
),
.target (
name: "SentrySwiftUI",
dependencies: ["Sentry", "SentryInternal"],
path: "Sources/SentrySwiftUI",
exclude: ["SentryInternal/", "module.modulemap"],
linkerSettings: [
.linkedFramework("Sentry")
]),
.target(
name: "SentryInternal",
path: "Sources/SentrySwiftUI",
sources: [
"SentryInternal/"
],
publicHeadersPath: "SentryInternal/"),
.target(
name: "SentryCppHelper",
dependencies: ["Sentry"],
path: "Sources/SentryCppHelper",
linkerSettings: [
.linkedLibrary("c++")
]
)
]
let env = getenv("EXPERIMENTAL_SPM_BUILDS")
if let env = env, String(cString: env) == "1" {
products.append(.library(name: "SentrySPM", type: .dynamic, targets: ["SentryObjc"]))
targets.append(contentsOf: [
// At least one source file is required, therefore we use a dummy class to satisfy the SPM build system
.target(
name: "SentryHeaders",
path: "Sources/Sentry",
sources: ["SentryDummyPublicEmptyClass.m"],
publicHeadersPath: "Public"
),
.target(
name: "_SentryPrivate",
dependencies: ["SentryHeaders"],
path: "Sources/Sentry",
sources: ["SentryDummyPrivateEmptyClass.m"],
publicHeadersPath: "include",
cSettings: [.headerSearchPath("include/HybridPublic")]),
.target(
name: "SentrySwift",
dependencies: ["_SentryPrivate", "SentryHeaders"],
path: "Sources/Swift",
swiftSettings: [
.unsafeFlags(["-enable-library-evolution"]),
// Some API breaking changes are necessary for the framework to compile with SPM, we’ll ship
// those in V9.
.define("SDK_V9")
]),
.target(
name: "SentryObjc",
dependencies: ["SentrySwift"],
path: "Sources",
exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "Resources", "Configuration", "SentryCppHelper"],
publicHeadersPath: "",
cSettings: [
.headerSearchPath("Sentry/include/HybridPublic"),
.headerSearchPath("Sentry"),
.headerSearchPath("SentryCrash/Recording"),
.headerSearchPath("SentryCrash/Recording/Monitors"),
.headerSearchPath("SentryCrash/Recording/Tools"),
.headerSearchPath("SentryCrash/Installations"),
.headerSearchPath("SentryCrash/Reporting/Filters"),
.headerSearchPath("SentryCrash/Reporting/Filters/Tools"),
.define("SDK_V9")])
])
}
let package = Package(
name: "Sentry",
platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4), .visionOS(.v1)],
products: products,
targets: targets,
cxxLanguageStandard: .cxx14
)