From: Matt Corallo Date: Fri, 30 Jul 2021 00:31:14 +0000 (+0000) Subject: Make Package.swift read environment to get ldk-c-bindings path X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=87472bdf94731ce05bc1ff6213f53e75c1dfbb62;p=ldk-swift-linux Make Package.swift read environment to get ldk-c-bindings path --- diff --git a/LDKSwift/Package.swift b/LDKSwift/Package.swift index 4ecd9d3..052661b 100644 --- a/LDKSwift/Package.swift +++ b/LDKSwift/Package.swift @@ -2,6 +2,7 @@ // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription +import Foundation let package = Package( name: "LDKSwift", @@ -20,8 +21,8 @@ let package = Package( name: "LDKSwift", dependencies: ["LDKCHeaders"], linkerSettings: [ - .linkedLibrary("/root/ldk-c-bindings/lightning-c-bindings/target/debug/libldk.a"), - .linkedLibrary("/root/ldk-c-bindings/lightning-c-bindings/ldk_net.o"), + .linkedLibrary(String(utf8String: getenv("LDK_C_BINDINGS_BASE")!)! + "/lightning-c-bindings/target/debug/libldk.a"), + .linkedLibrary(String(utf8String: getenv("LDK_C_BINDINGS_BASE")!)! + "/lightning-c-bindings/ldk_net.o"), .linkedLibrary("/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.a") ]), .testTarget(