-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
76 lines (71 loc) · 1.91 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
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "LLMKit",
platforms: [
.macOS(.v14),
],
products: [
.executable(
name: "Demo",
targets: ["Demo"]
),
.library(
name: "LlamaCppLib",
type: .static,
targets: ["LlamaCppLib"]
),
.library(
name: "LLMKit",
targets: ["LLMKit"]
)
],
dependencies: [
.package(url: "https://github.com/spprichard/llama.cpp", branch: "master"),
.package(url: "https://github.com/apple/swift-log", from: "1.5.4"),
],
targets: [
.executableTarget(
name: "Demo",
dependencies: [
"LLMKit"
],
path: "Sources/Demo",
sources: ["main.swift"],
swiftSettings: [
.interoperabilityMode(.Cxx),
]
),
.target(
name: "LlamaCppLib",
dependencies: [
.product(name: "llama", package: "llama.cpp"),
.product(name: "Logging", package: "swift-log")
],
swiftSettings: [
.interoperabilityMode(.Cxx),
]
// linkerSettings: [
// .linkedFramework("CoreFoundation"),
// ]
),
.target(
name: "LLMKit",
dependencies: [
"LlamaCppLib"
],
swiftSettings: [.interoperabilityMode(.Cxx)]
),
.testTarget(
name: "LLMKitTests",
dependencies: [
"LLMKit"
],
swiftSettings: [
.interoperabilityMode(.Cxx),
]
)
]
// cxxLanguageStandard: CXXLanguageStandard.gnucxx14
)