forked from yeatse/opencv-spm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
36 lines (33 loc) · 1.24 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let version = "4.8.0"
let checksum = "83d60791fb49b22a9c587d6aded426d213afcfc733a5439b050e5dddd2706292"
let package = Package(
name: "opencv-spm",
platforms: [
.macOS(.v10_13), .iOS(.v11), .macCatalyst(.v13)
],
products: [
.library(
name: "opencv2",
targets: ["opencv2", "opencv2-dependencies"]),
],
targets: [
.binaryTarget(name: "opencv2",
url: "https://github.com/gamechanger/opencv-spm/releases/download/\(version)/opencv2.xcframework.zip",
checksum: checksum),
.target(
name: "opencv2-dependencies",
linkerSettings: [
.linkedFramework("AVFoundation"),
.linkedFramework("CoreImage"),
.linkedFramework("CoreMedia"),
.linkedFramework("CoreVideo", .when(platforms: [.iOS])),
.linkedFramework("Accelerate", .when(platforms: [.iOS, .macOS])),
.linkedFramework("OpenCL", .when(platforms: [.macOS])),
.linkedLibrary("c++")
]
)
]
)