forked from FLEXTool/FLEX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
106 lines (99 loc) · 4.13 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
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
// swift-tools-version:5.3
import PackageDescription
enum FLEXBuildOptions {
/// Set this to `true` to use `.unsafeFlags` to silence warnings.
static let silenceWarnings = false
}
#if swift(>=5.7)
let platforms: [PackageDescription.SupportedPlatform] = [.iOS(.v11)]
#else
let platforms: [PackageDescription.SupportedPlatform] = [.iOS(.v10)]
#endif
let package = Package(
name: "FLEX",
platforms: platforms,
products: [
.library(name: "FLEX", targets: ["FLEX"])
],
targets: [
.target(
name: "FLEX",
path: "Classes",
exclude: [
"Info.plist",
"Utility/APPLE_LICENSE",
"Network/OSCache/LICENSE.md",
"Network/PonyDebugger/LICENSE",
"GlobalStateExplorers/DatabaseBrowser/LICENSE",
"GlobalStateExplorers/Keychain/SSKeychain_LICENSE",
"GlobalStateExplorers/SystemLog/LLVM_LICENSE.TXT",
],
publicHeadersPath: "Headers",
cSettings: .headerSearchPaths + .warningFlags
)
],
// Required to compile FLEXSwiftInternal.mm
cxxLanguageStandard: .gnucxx11
)
extension Array where Element == CSetting {
static var warningFlags: [Element] {
if FLEXBuildOptions.silenceWarnings {
return [.unsafeFlags([
"-Wno-deprecated-declarations",
"-Wno-strict-prototypes",
"-Wno-unsupported-availability-guard",
])]
}
return []
}
/// These are the header search paths needed for FLEX to compile, not
/// the headers used by projects linking against FLEX.
///
/// Do not modify the contents of this property by hand;
/// Instead, run `bash generate-spm-headers.sh | grep headerSearchPath | pbcopy`
/// and paste (and indent) the result below. Do this any time new folders are added.
static var headerSearchPaths: [Element] {
[
.headerSearchPath("Classes"),
.headerSearchPath("Core"),
.headerSearchPath("Core/Controllers"),
.headerSearchPath("Core/Views"),
.headerSearchPath("Core/Views/Cells"),
.headerSearchPath("Core/Views/Carousel"),
.headerSearchPath("ObjectExplorers"),
.headerSearchPath("ObjectExplorers/Sections"),
.headerSearchPath("ObjectExplorers/Sections/Shortcuts"),
.headerSearchPath("Network"),
.headerSearchPath("Network/PonyDebugger"),
.headerSearchPath("Network/OSCache"),
.headerSearchPath("Toolbar"),
.headerSearchPath("Manager"),
.headerSearchPath("Manager/Private"),
.headerSearchPath("Editing"),
.headerSearchPath("Editing/ArgumentInputViews"),
.headerSearchPath("Headers"),
.headerSearchPath("ExplorerInterface"),
.headerSearchPath("ExplorerInterface/Tabs"),
.headerSearchPath("ExplorerInterface/Bookmarks"),
.headerSearchPath("GlobalStateExplorers"),
.headerSearchPath("GlobalStateExplorers/Globals"),
.headerSearchPath("GlobalStateExplorers/Keychain"),
.headerSearchPath("GlobalStateExplorers/FileBrowser"),
.headerSearchPath("GlobalStateExplorers/SystemLog"),
.headerSearchPath("GlobalStateExplorers/DatabaseBrowser"),
.headerSearchPath("GlobalStateExplorers/RuntimeBrowser"),
.headerSearchPath("GlobalStateExplorers/RuntimeBrowser/DataSources"),
.headerSearchPath("ViewHierarchy"),
.headerSearchPath("ViewHierarchy/SnapshotExplorer"),
.headerSearchPath("ViewHierarchy/SnapshotExplorer/Scene"),
.headerSearchPath("ViewHierarchy/TreeExplorer"),
.headerSearchPath("Utility"),
.headerSearchPath("Utility/Runtime"),
.headerSearchPath("Utility/Runtime/Objc"),
.headerSearchPath("Utility/Runtime/Objc/Reflection"),
.headerSearchPath("Utility/Categories"),
.headerSearchPath("Utility/Categories/Private"),
.headerSearchPath("Utility/Keyboard")
]
}
}