-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPackage.swift
64 lines (60 loc) · 1.68 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
60
61
62
63
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.
import Foundation
import PackageDescription
var linkerSettings: [LinkerSetting] = [
.linkedLibrary("skia_skiakit"),
]
#if os(Linux) || os(macOS)
linkerSettings.append(contentsOf: [
.linkedLibrary("freetype"),
.linkedLibrary("fontconfig"),
.linkedLibrary("z")
])
#endif
#if os(macOS)
linkerSettings.append(.linkedLibrary("c++"))
#endif
let package = Package(
name: "SkiaKit",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.tvOS(.v13),
],
products: [
.library(name: "SkiaKit", targets: ["SkiaKit"]),
.executable(name: "Samples", targets: ["Samples"])
],
targets: [
.target (
name: "SkiaKit",
dependencies: ["CSkia"]
/*cSettings: [
.headerSearchPath("Shared/Headers"),
.headerSearchPath("SkiaKit/Apple", .when (platforms: [.macOS,.tvOS, .iOS])),
.headerSearchPath("SkiaKit/macOS", .when (platforms: [.macOS])),
.headerSearchPath("SkiaKit/iOS", .when (platforms: [.iOS])),
.headerSearchPath("SkiaKit/tvOS", .when (platforms: [.tvOS])),
.headerSearchPath("include")],
linkerSettings: linkFlags*/
),
.target (
name: "CSkia",
linkerSettings: linkerSettings
/*,
path: "skiasharp",
sources: ["dummy.m"],
cSettings: [
.headerSearchPath("../Shared/Headers"),
.headerSearchPath("../SkiaKit/macOS", .when (platforms: [.macOS])),
.headerSearchPath("include")]*/
),
.target(
name: "Samples",
dependencies: ["CSkia", "SkiaKit"],
path: "Samples/Gallery",
sources: ["main.swift", "2DPathSample.swift"]
)
]
)