-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPackage.swift
55 lines (54 loc) · 2.03 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
// swift-tools-version: 5.10
import PackageDescription
// This root Package.swift by design only builds the Swift/WinRT support modules, and not the code generator.
// This allows projects to reference this git repo as a library dependency from their own Package.swift files.
let package = Package(
name: "SwiftWinRT",
products: [
.library(
name: "WindowsRuntime_ABI",
targets: ["COM_ABI", "WindowsRuntime_ABI"]),
.library(
name: "WindowsRuntime",
targets: ["ABIBindings", "COM", "WindowsRuntime"]),
],
targets: [
.target(
name: "COM_ABI",
path: "Support/Sources/COM_ABI",
exclude: ["CMakeLists.txt"]),
.target(
name: "WindowsRuntime_ABI",
dependencies: ["COM_ABI"],
path: "Support/Sources/WindowsRuntime_ABI",
exclude: ["CMakeLists.txt"]),
.target(
name: "ABIBindings",
path: "Support/Sources/ABIBindings",
exclude: ["CMakeLists.txt"]),
.target(
name: "COM",
dependencies: ["ABIBindings", "COM_ABI"],
path: "Support/Sources/COM",
exclude: ["CMakeLists.txt"]),
.target(
name: "WindowsRuntime",
dependencies: ["COM", "WindowsRuntime_ABI"],
path: "Support/Sources/WindowsRuntime",
exclude: [
"CMakeLists.txt",
"Projection/Readme.md",
"Projection/WindowsFoundation/Readme.md",
]),
.target(
name: "TestsABI",
dependencies: ["COM_ABI", "WindowsRuntime_ABI"],
path: "Support/Tests/ABI"),
.testTarget(
name: "Tests",
dependencies: ["COM", "WindowsRuntime", "TestsABI"],
path: "Support/Tests/Tests",
// Workaround for SPM library support limitations causing "LNK4217: locally defined symbol imported" spew
linkerSettings: [ .unsafeFlags(["-Xlinker", "-ignore:4217"]) ]),
]
)