Skip to content

Commit fb4593a

Browse files
committed
Ensure binary xcframeworks link for static product
1 parent e6c49a7 commit fb4593a

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Package.swift

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,20 @@ let package = Package(
2727
// Targets can depend on other targets in this package, and on products in packages this package depends on.
2828
.target(
2929
name: "Starknet",
30-
dependencies: ["BigInt", "CryptoToolkit", "CryptoSwift"]
30+
dependencies: ["BigInt", "CryptoToolkit", "CryptoSwift", "ccryptocpp", "poseidon", "CryptoRs"]
31+
),
32+
.target(
33+
name: "CryptoToolkit",
34+
dependencies: ["CFrameworkWrapper", "ccryptocpp", "poseidon", "CryptoRs"]
35+
),
36+
.target(
37+
name: "CFrameworkWrapper",
38+
dependencies: ["ccryptocpp", "poseidon", "CryptoRs"],
39+
linkerSettings: [
40+
.linkedLibrary("c++"),
41+
.linkedLibrary("c++abi")
42+
]
3143
),
32-
.target(name: "CryptoToolkit", dependencies: ["CFrameworkWrapper"]),
33-
.target(name: "CFrameworkWrapper", dependencies: ["ccryptocpp", "poseidon", "CryptoRs"]),
3444
.binaryTarget(name: "ccryptocpp", path: "Frameworks/ccryptocpp.xcframework"),
3545
.binaryTarget(name: "poseidon", path: "Frameworks/poseidon.xcframework"),
3646
.binaryTarget(name: "CryptoRs", path: "Frameworks/CryptoRs.xcframework"),

0 commit comments

Comments
 (0)