-
Notifications
You must be signed in to change notification settings - Fork 69
76 lines (74 loc) · 2.5 KB
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
// swift-tools-version:5.4
import PackageDescription
let SwiftWin32 = 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(name: "SwiftCOM", url: "https://github.com/compnerd/swift-com.git",
.revision("ebbc617d3b7ba3a2023988a74bebd118deea4cc5")),
],
targets: [
.target(
name: "SwiftWin32",
dependencies: [
.product(name: "Logging", package: "swift-log"),
.product(name: "OrderedCollections", package: "swift-collections"),
.product(name: "cassowary", package: "cassowary"),
.product(name: "SwiftCOM", package: "SwiftCOM"),
],
path: "Sources/SwiftWin32",
exclude: ["CMakeLists.txt"],
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: ["SwiftWin32"]),
.testTarget(name: "SupportTests", dependencies: ["SwiftWin32"]),
.testTarget(
name: "UICoreTests",
dependencies: ["SwiftWin32", "TestUtilities"]
)
]
)