Add CI
[ldk-swift-linux] / LDKSwift / Package.swift
1 // swift-tools-version:5.3
2 // The swift-tools-version declares the minimum version of Swift required to build this package.
3
4 import PackageDescription
5 import Foundation
6
7 let package = Package(
8     name: "LDKSwift",
9     products: [
10         .library(
11             name: "LDKSwift",
12             targets: ["LDKSwift"]),
13     ],
14     dependencies: [
15         .package(path: "../LDKCHeaders"),
16     ],
17     targets: [
18         // Targets are the basic building blocks of a package. A target can define a module or a test suite.
19         // Targets can depend on other targets in this package, and on products in packages this package depends on.
20         .target(
21             name: "LDKSwift",
22             dependencies: ["LDKCHeaders"],
23             linkerSettings: [
24                  .linkedLibrary(String(utf8String: getenv("LDK_C_BINDINGS_BASE")!)! + "/lightning-c-bindings/target/debug/libldk.a"),
25                  .linkedLibrary(String(utf8String: getenv("LDK_C_BINDINGS_BASE")!)! + "/lightning-c-bindings/ldk_net.o"),
26                 .linkedLibrary("/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.a")
27             ]),
28         .testTarget(
29             name: "LDKSwiftTests",
30             dependencies: ["LDKSwift"]),
31     ]
32 )