-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
50 lines (48 loc) · 1.29 KB
/
Package.swift
File metadata and controls
50 lines (48 loc) · 1.29 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
// swift-tools-version: 6.1
import PackageDescription
let package = Package(
name: "Libgit2Swift",
platforms: [.macOS(.v13)],
products: [
.library(
name: "Git",
targets: ["Git"]
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-log.git", from: "1.6.3")
],
targets: [
.systemLibrary(
name: "libgit2",
path: "Sources/libgit2",
pkgConfig: "libgit2",
providers: [
.brew(["libgit2"])
]
),
.target(
name: "Git",
dependencies: [
"libgit2",
.product(name: "Logging", package: "swift-log")
],
cSettings: [
.unsafeFlags(["-I/opt/homebrew/include", "-I/opt/homebrew/opt/libgit2/include"], .when(platforms: [.macOS]))
],
linkerSettings: [
.linkedLibrary("git2"),
.unsafeFlags(["-L/opt/homebrew/lib"], .when(platforms: [.macOS]))
]
),
.testTarget(
name: "GitTests",
dependencies: [
.target(name: "Git")
],
resources: [
.process("Git.xctestplan")
]
)
]
)