-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
45 lines (43 loc) · 1.14 KB
/
Package.swift
File metadata and controls
45 lines (43 loc) · 1.14 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
// swift-tools-version: 6.2
import PackageDescription
#if os(macOS)
let linkerSettings: [LinkerSetting] = [.unsafeFlags(["-L/opt/homebrew/lib"])]
#else
let linkerSettings: [LinkerSetting] = []
#endif
let package = Package(
name: "SwiftMTP",
platforms: [.macOS(.v15)],
products: [
.library(name: "SwiftMTP", targets: ["SwiftMTP"]),
.library(name: "SwiftMTPAsync", targets: ["SwiftMTPAsync"]),
],
targets: [
.systemLibrary(
name: "Clibmtp",
pkgConfig: "libmtp",
providers: [.brew(["libmtp"]), .apt(["libmtp-dev"])]
),
.target(
name: "MTPCore",
dependencies: ["Clibmtp"],
linkerSettings: linkerSettings
),
.target(
name: "SwiftMTP",
dependencies: ["MTPCore"]
),
.target(
name: "SwiftMTPAsync",
dependencies: ["MTPCore"]
),
.testTarget(
name: "MTPCoreTests",
dependencies: ["MTPCore"]
),
.testTarget(
name: "HardwareTests",
dependencies: ["SwiftMTPAsync"]
),
]
)