forked from huibin1984/GPUImage2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
51 lines (35 loc) · 874 Bytes
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import PackageDescription
/**
Better to create variables for the excludes so you dont have the
package def wrapped with macros .
Also need to trap if os is not support like watch and tv
*/
#if os(macOS)
let excludes = ["iOS", "Linux"]
#elseif os(iOS)
let excludes = ["Linux", "Mac"]
#elseif os(Linux)
let excludes = ["iOS", "Mac"]
#endif
#if os(Linux) || os(macOS) || os(Linux)
let package = Package(
name: "GPUImage",
providers: [
.Apt("libv4l-dev"),
],
targets: [
Target(name: "GPUImage")
],
dependencies:[],
exclude: excludes
)
#if os(Linux)
package.dependencies.append([
.Package(url: "./Packages/CVideo4Linux", majorVersion: 1),
.Package(url: "./Packages/COpenGL", majorVersion: 1),
.Package(url: "./Packages/CFreeGLUT", majorVersion: 1),
])
#endif
#else
fatalError("Unsupported OS")
#endif