-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathPackage.swift
More file actions
36 lines (33 loc) · 1.26 KB
/
Package.swift
File metadata and controls
36 lines (33 loc) · 1.26 KB
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.13.0"
let checksum = "41fc3bf0f2af1660e24694a3e05d5c56e5869a133cea7084a7e262d54dd5b675"
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++")
]
)
]
)