forked from BradLarson/GPUImage2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
executable file
·59 lines (55 loc) · 2.06 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// swift-tools-version:4.2
import PackageDescription
#if os(macOS) // This fires for both macOS and iOS targets, because it's based on build platform
let platformDependencies: [Package.Dependency] = []
let platformExcludes = ["Linux", "Operations/Shaders"]
let platformTargets: [Target] = [
.target(
name: "GPUImage",
path: "framework/Source",
exclude: platformExcludes)]
let platformProducts: [Product] = [
.library(
name: "GPUImage",
targets: ["GPUImage"]),
]
#elseif os(Linux)
// TODO: Add back in RPi support
// TODO: Move the remote system library packages into this project
let platformDependencies: [Package.Dependency] = [
.package(url: "https://github.com/BradLarson/COpenGL.git", from: "1.0.2"),
.package(url: "https://github.com/BradLarson/CFreeGLUT.git", from: "1.0.1"),
.package(url: "https://github.com/BradLarson/CVideo4Linux.git", from: "1.0.2")]
let platformExcludes = ["Apple", "Operations/Shaders", "Linux/RPiRenderWindow.swift", "Linux/OpenGLContext-RPi.swift", "Linux/V4LSupplement", "Linux/V4LCamera"]
let platformTargets: [Target] = [
.target(
name: "lodepng",
path: "framework/Packages/lodepng"),
.target(
name: "GPUImage",
dependencies: ["lodepng"],
path: "framework/Source",
exclude: platformExcludes),
.target(
name: "V4LSupplement",
path: "framework/Source/Linux/V4LSupplement"),
.target(
name: "GPUImageV4LCamera",
dependencies: ["GPUImage", "V4LSupplement"],
path: "framework/Source/Linux/V4LCamera")]
let platformProducts: [Product] = [
.library(
name: "GPUImage",
targets: ["GPUImage"]),
.library(
name: "GPUImageV4LCamera",
targets: ["GPUImageV4LCamera"]),
]
#endif
let package = Package(
name: "GPUImage",
products: platformProducts,
dependencies: platformDependencies,
targets: platformTargets,
swiftLanguageVersions: [.v4]
)