42 lines
1.4 KiB
Swift
42 lines
1.4 KiB
Swift
|
// swift-tools-version:5.5
|
||
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||
|
|
||
|
import PackageDescription
|
||
|
|
||
|
let checksum = "051aa92b9fff0b18e54c6a82ea12231edf4cfa98b49889223870b3c63bf2829b"
|
||
|
let version = "v1.0.0-alpha"
|
||
|
let url = "https://github.com/matrix-org/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
|
||
|
|
||
|
let package = Package(
|
||
|
name: "MatrixRustComponentsSwift",
|
||
|
products: [
|
||
|
.library(
|
||
|
name: "MatrixRustComponentsSwift",
|
||
|
targets: ["MatrixRustComponentsSwift"]),
|
||
|
],
|
||
|
targets: [
|
||
|
.binaryTarget(
|
||
|
name: "MatrixSDKFFI",
|
||
|
url: url,
|
||
|
checksum: checksum),
|
||
|
/*
|
||
|
* A placeholder wrapper for our binaryTarget so that Xcode will ensure this is
|
||
|
* downloaded/built before trying to use it in the build process
|
||
|
* A bit hacky but necessary for now https://github.com/mozilla/application-services/issues/4422
|
||
|
*/
|
||
|
.target(
|
||
|
name: "MatrixSDKFFIWrapper",
|
||
|
dependencies: [
|
||
|
.target(name: "MatrixSDKFFI")
|
||
|
],
|
||
|
path: "MatrixSDKFFIWrapper"
|
||
|
),
|
||
|
.target(
|
||
|
name: "MatrixRustComponentsSwift",
|
||
|
dependencies: ["MatrixSDKFFIWrapper"]),
|
||
|
.testTarget(
|
||
|
name: "MatrixRustComponentsSwiftTests",
|
||
|
dependencies: ["MatrixRustComponentsSwift"]),
|
||
|
]
|
||
|
)
|