-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackage.swift
More file actions
98 lines (95 loc) · 3.15 KB
/
Copy pathPackage.swift
File metadata and controls
98 lines (95 loc) · 3.15 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
// swift-tools-version: 6.0
import PackageDescription
let reactHeaders: [Target.Dependency] = [
.product(name: "ReactHeaders", package: "ReactNative"),
.product(name: "ReactNativeHeaders", package: "ReactNative"),
.product(name: "ReactNativeDependenciesHeaders", package: "ReactNative"),
.product(name: "ReactAppHeaders", package: "React-GeneratedCode"),
]
let package = Package(
name: "ReactNativeFileHash",
platforms: [.iOS(.v15)],
products: [
.library(name: "ReactNativeFileHash", targets: ["ReactNativeFileHash"]),
],
dependencies: [
// These paths are supplied by React Native's SPM autolinker under
// ios/build/generated/autolinking/plugins/ReactNativeFileHash.
.package(name: "ReactNative", path: "../../../../xcframeworks"),
.package(name: "React-GeneratedCode", path: "../../../ios"),
],
targets: [
.target(
name: "FileHashNativeCore",
path: "ios/Engines/Native/Core",
publicHeadersPath: ".",
cSettings: [
.headerSearchPath("../../../../third_party/xxhash"),
.headerSearchPath("../../../../third_party/blake3/c"),
.define("BLAKE3_NO_SSE2", to: "1"),
.define("BLAKE3_NO_SSE41", to: "1"),
.define("BLAKE3_NO_AVX2", to: "1"),
.define("BLAKE3_NO_AVX512", to: "1"),
],
cxxSettings: [
.headerSearchPath("../../../../third_party/xxhash"),
.headerSearchPath("../../../../third_party/blake3/c"),
.define("BLAKE3_NO_SSE2", to: "1"),
.define("BLAKE3_NO_SSE41", to: "1"),
.define("BLAKE3_NO_AVX2", to: "1"),
.define("BLAKE3_NO_AVX512", to: "1"),
]
),
.target(
name: "FileHashNative",
dependencies: ["FileHashNativeCore"] + reactHeaders,
path: "ios/Engines/Native/Swift",
linkerSettings: [
.linkedFramework("CryptoKit"),
.linkedFramework("Foundation"),
.linkedFramework("Security"),
]
),
.target(
name: "ReactNativeFileHash",
dependencies: ["FileHashNative"] + reactHeaders,
path: "ios",
sources: [
"ReactNative/FileHash.h",
"ReactNative/FileHash.mm",
"ReactNative/FileHashBridgeHelpers.h",
"ReactNative/FileHashPromiseTypes.h",
"ReactNative/FileHashBridgeHelpers.mm",
"ReactNative/FileHashBridgeNative.h",
"ReactNative/FileHashBridgeNative.m",
],
publicHeadersPath: "ReactNative",
cSettings: [
.headerSearchPath("ReactNative"),
.headerSearchPath("."),
],
cxxSettings: [
.headerSearchPath("ReactNative"),
.headerSearchPath("."),
.unsafeFlags([
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
"-Wno-comma",
"-Wno-shorten-64-to-32",
"-DRN_FABRIC_ENABLED",
"-fno-modules",
]),
.define("DEBUG", .when(configuration: .debug)),
.define("NDEBUG", .when(configuration: .release)),
],
linkerSettings: [
.linkedFramework("Foundation"),
]
),
],
swiftLanguageModes: [.v5],
cxxLanguageStandard: .cxx20
)