-
Notifications
You must be signed in to change notification settings - Fork 71
/
Package.swift
90 lines (88 loc) · 4.1 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// swift-tools-version:5.9
import PackageDescription
let SwiftWin32: Package =
Package(name: "SwiftWin32",
products: [
.library(name: "SwiftWin32",
type: .dynamic,
targets: ["SwiftWin32"]),
.library(name: "SwiftWin32UI",
type: .dynamic,
targets: ["SwiftWin32UI"]),
.executable(name: "UICatalog", targets: ["UICatalog"]),
.executable(name: "Calculator", targets: ["Calculator"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-log.git",
.upToNextMajor(from: "1.4.3")),
.package(url: "https://github.com/apple/swift-collections.git",
.upToNextMinor(from: "1.0.0")),
.package(url: "https://github.com/compnerd/cassowary.git",
branch: "main"),
.package(url: "https://github.com/compnerd/swift-com.git",
revision: "ebbc617d3b7ba3a2023988a74bebd118deea4cc5"),
],
targets: [
.target(name: "CoreAnimation",
path: "Sources/SwiftWin32/CoreAnimation"),
.target(name: "CoreGraphics",
path: "Sources/SwiftWin32/CoreGraphics"),
.target(name: "SwiftWin32",
dependencies: [
"CoreAnimation",
"CoreGraphics",
.product(name: "Logging", package: "swift-log"),
.product(name: "OrderedCollections",
package: "swift-collections"),
.product(name: "cassowary", package: "cassowary"),
.product(name: "SwiftCOM", package: "swift-com"),
],
path: "Sources/SwiftWin32",
exclude: [
"CoreAnimation",
"CoreGraphics",
"CMakeLists.txt"
],
swiftSettings: [
.enableExperimentalFeature("AccessLevelOnImport"),
],
linkerSettings: [
.linkedLibrary("User32"),
.linkedLibrary("ComCtl32"),
]),
.target(name: "SwiftWin32UI",
dependencies: ["SwiftWin32"],
path: "Sources/SwiftWin32UI",
exclude: ["CMakeLists.txt"]),
.executableTarget(name: "Calculator",
dependencies: ["SwiftWin32"],
path: "Examples/Calculator",
exclude: [
"CMakeLists.txt",
"Calculator.exe.manifest",
"Info.plist",
],
swiftSettings: [
.unsafeFlags(["-parse-as-library"])
]),
.executableTarget(name: "UICatalog",
dependencies: ["SwiftWin32"],
path: "Examples/UICatalog",
exclude: [
"CMakeLists.txt",
"Info.plist",
"UICatalog.exe.manifest",
],
resources: [
.copy("Assets/CoffeeCup.jpg")
],
swiftSettings: [
.unsafeFlags(["-parse-as-library"])
]),
.target(name: "TestUtilities", path: "Tests/Utilities"),
.testTarget(name: "AutoLayoutTests", dependencies: ["SwiftWin32"]),
.testTarget(name: "CoreGraphicsTests", dependencies: ["CoreGraphics"]),
.testTarget(name: "SupportTests", dependencies: ["SwiftWin32"]),
.testTarget(name: "UICoreTests",
dependencies: ["SwiftWin32", "TestUtilities"])
])