-
Notifications
You must be signed in to change notification settings - Fork 4
/
Package.swift
72 lines (58 loc) · 1.99 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
64
65
66
67
68
69
70
71
72
// swift-tools-version:5.3
import Foundation
import PackageDescription
let SCADE_SDK = ProcessInfo.processInfo.environment["SCADE_SDK"] ?? ""
let swiftSettings: [SwiftSetting] = [
.unsafeFlags(["-F", SCADE_SDK], .when(platforms: [.macOS, .iOS])),
.unsafeFlags(["-I", "\(SCADE_SDK)/include"], .when(platforms: [.android]))
]
let linkerSettings: [LinkerSetting] = [
.unsafeFlags(["-F", SCADE_SDK], .when(platforms: [.macOS, .iOS]))
]
let package = Package(
name: "ScadeExtensions",
platforms: [
.macOS(.v10_14), .iOS(.v12)
],
products: [
.library(
name: "ScadeExtensions",
targets: ["ScadeExtensions", "ScadeCore", "ScadeGraphics", "ScadeUI"]),
],
dependencies: [
.package(name: "Android", url: "https://github.com/scade-platform/swift-android.git", .branch("android/24")),
],
targets: [
.target(
name: "ScadeExtensions",
dependencies: [],
path: "Sources/Extensions",
swiftSettings: swiftSettings,
linkerSettings: linkerSettings
),
.target(
name: "ScadeCore",
dependencies: [],
path: "Sources/Core",
swiftSettings: swiftSettings,
linkerSettings: linkerSettings
),
.target(
name: "ScadeGraphics",
dependencies: [],
path: "Sources/Graphics",
swiftSettings: swiftSettings,
linkerSettings: linkerSettings
),
.target(
name: "ScadeUI",
dependencies: [
.product(name: "AndroidApp", package: "Android", condition: .when(platforms: [.android])),
.product(name: "AndroidView", package: "Android", condition: .when(platforms: [.android])),
],
path: "Sources/UI",
swiftSettings: swiftSettings,
linkerSettings: linkerSettings
)
]
)