Skip to content

Commit 14dcb0f

Browse files
committed
Make Package.swift valid on Linux
1 parent b39ba32 commit 14dcb0f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

ci/LDKSwift/Package.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ if let bindingsBase = getenv("LDK_C_BINDINGS_BASE") {
99
cBindingsBase = String(utf8String: bindingsBase)!
1010
}
1111

12-
let linkerSettings: [PackageDescription.LinkerSetting] = [
13-
.linkedLibrary(cBindingsBase + "/lightning-c-bindings/target/debug/libldk.a")
12+
var fileExtension = ".dylib"
13+
#if os(Linux)
14+
fileExtension = ".a"
15+
#endif
16+
17+
var linkerSettings: [PackageDescription.LinkerSetting] = [
18+
.linkedLibrary("\(cBindingsBase)/lightning-c-bindings/target/debug/libldk\(fileExtension)")
1419
]
1520

1621
#if os(Linux)

ci/docker_shell.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LDK_SUBDIRECTORY="$LDK_DIRECTORY/lightning-c-bindings"
1010

1111
if [[ "${MOUNT_CI_FOLDER}" = "true" ]]; then
1212
# use for direct ci folder access
13-
cp -R bindings/batteries ci/LDKSwift/Sources/LDKSwift
13+
# cp -R bindings/batteries ci/LDKSwift/Sources/LDKSwift
1414
# docker run --name "swift-generator-shell" -e MOUNTED_CI_FOLDER=true -i -v $PROJECT_DIRECTORY/ci:/ci -v $LDK_DIRECTORY:/ldk-c-bindings --rm -t swift-generation-ci /bin/bash
1515
docker run --name "swift-generator-shell" -e MOUNTED_CI_FOLDER=true -i -v $PROJECT_DIRECTORY/ci:/ci -v $LDK_DIRECTORY:/ldk-c-bindings -v $PROJECT_DIRECTORY/src:/src --rm -t swift-generation-ci /bin/bash
1616
elif [ "${MOUNT_CI_FOLDER}" = "false" ]; then

0 commit comments

Comments
 (0)