This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Package.swift
50 lines (46 loc) · 1.62 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
// swift-tools-version: 5.10
import PackageDescription
import Foundation
let currentDirectory = Context.packageDirectory
let linkerSettings: [LinkerSetting] = [
/* Figure out magic incantation so we can delay load these dlls
.unsafeFlags(["-L\(currentDirectory)/Sources/CWinAppSDK/nuget/lib"]),
.unsafeFlags(["-Xlinker" , "/DELAYLOAD:Microsoft.WindowsAppRuntime.Bootstrap.dll"]),
*/
]
let package = Package(
name: "swift-windowsappsdk",
products: [
.library(name: "WinAppSDK", type: .dynamic, targets: ["WinAppSDK"]),
.library(name: "CWinAppSDK", targets: ["CWinAppSDK"]),
],
dependencies: [
.package(url: "https://github.com/thebrowsercompany/swift-cwinrt", branch: "main"),
.package(url: "https://github.com/thebrowsercompany/swift-uwp", branch: "main"),
.package(url: "https://github.com/thebrowsercompany/swift-windowsfoundation", branch: "main"),
],
targets: [
.target(
name: "WinAppSDK",
dependencies: [
.product(name: "CWinRT", package: "swift-cwinrt"),
.product(name: "UWP", package: "swift-uwp"),
.product(name: "WindowsFoundation", package: "swift-windowsfoundation"),
"CWinAppSDK"
]
),
.target(
name: "CWinAppSDK",
resources: [
.copy("nuget/bin/Microsoft.WindowsAppRuntime.Bootstrap.dll"),
],
linkerSettings: linkerSettings
),
.testTarget(
name: "WinAppSDKTests",
dependencies: [
"WinAppSDK",
]
)
]
)