-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
76 lines (73 loc) · 2.17 KB
/
Package.swift
File metadata and controls
76 lines (73 loc) · 2.17 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
// swift-tools-version: 5.9
import PackageDescription
//
// Reference
// * https://swift.org/documentation/cxx-interop/
//
let package = Package(
name: "Baguette",
products: [
.library(
name: "BaguetteBridge",
targets: ["BaguetteBridge"]),
.library(
name: "Baguette",
type: .static,
targets: ["Baguette"])
],
targets: [
.target(
name: "Baguette",
path: "src",
sources: [
"Baguette.h",
"bridge_apple.cpp",
"swift_crypto.hpp",
"swift_crypto.cpp",
"swift_decoder.hpp",
"swift_decoder.cpp",
"swift_hostinfo.hpp",
"swift_hostinfo.cpp"
],
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath("../externals/metal-cpp"),
.define("_DEBUG", to: "1", .when(configuration: .debug))
],
linkerSettings: [
// .unsafeFlags(["-fprofile-instr-generate"], .when(configuration: .debug)),
.linkedLibrary("boringssl"),
.linkedFramework("Foundation")
]),
.target(
name: "BaguetteBridge",
dependencies: [
.target(name: "Baguette")
],
path: "platform-apple",
swiftSettings: [
.interoperabilityMode(.Cxx)
],
linkerSettings: [
.linkedFramework("Foundation")
]),
.testTarget(
name: "BaguetteBridgeTests",
dependencies: [
"BaguetteBridge"
],
path: "test",
exclude: [
"baguette_test.cpp"
],
swiftSettings: [
.interoperabilityMode(.Cxx)
],
linkerSettings: [
.linkedFramework("Foundation", .when(platforms: [.iOS, .macOS, .macCatalyst])),
.linkedFramework("XCTest")
])
],
swiftLanguageVersions: [SwiftVersion.v5],
cxxLanguageStandard: CXXLanguageStandard.cxx20
)