-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathPackage.swift
36 lines (33 loc) · 1.26 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.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let version = "4.11.0"
let checksum = "4b1e76f3d1ce19369ff7e151d1c564926b4d23b5515c62fc65517dfd395c3929"
let package = Package(
name: "OpenCV",
platforms: [
.macOS(.v10_13), .iOS(.v12), .macCatalyst(.v13), .visionOS(.v1)
],
products: [
.library(
name: "OpenCV",
targets: ["opencv2", "opencv2-dependencies"]),
],
targets: [
.binaryTarget(name: "opencv2",
url: "https://github.com/yeatse/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, .visionOS])),
.linkedFramework("Accelerate", .when(platforms: [.iOS, .macOS, .visionOS])),
.linkedFramework("OpenCL", .when(platforms: [.macOS])),
.linkedLibrary("c++")
]
)
]
)