-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Package.swift
40 lines (37 loc) · 1.24 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
// swift-tools-version:5.8
import PackageDescription
let package = Package(
name: "FastRTPSSwift",
platforms: [.macOS(.v13)],
products: [
.library(
name: "FastRTPSSwift",
targets: ["FastRTPSSwift"]),
],
dependencies: [
.package(url: "https://github.com/DimaRU/CDRCodable.git", from: "1.0.0"),
.package(url: "https://github.com/DimaRU/FastDDSPrebuild.git", from: "2.0.0"),
],
targets: [
.target(
name: "FastRTPSWrapper",
dependencies: [
.product(name: "FastDDS", package: "FastDDSPrebuild")
]),
.target(
name: "FastRTPSSwift",
dependencies: ["CDRCodable", "FastRTPSWrapper"]),
.testTarget(
name: "FastRTPSSwiftTests",
dependencies: ["FastRTPSSwift"]),
],
cxxLanguageStandard: .cxx14
)
#if os(Linux)
package.dependencies.removeAll(where: { $0.name == "FastDDS"})
package.targets.first(where: { $0.name == "FastRTPSWrapper"})!.dependencies = []
package.targets.first(where: { $0.name == "FastRTPSSwift"})!.linkerSettings = [
.linkedLibrary("fastrtps", .when(platforms: [.linux])),
.unsafeFlags(["-L/usr/local/lib"], .when(platforms: [.linux]))
]
#endif