|
| 1 | +// swift-tools-version:5.7 |
| 2 | + |
| 3 | +import PackageDescription |
| 4 | + |
| 5 | +let SwiftWin32: Package = |
| 6 | + Package(name: "SwiftWin32", |
| 7 | + products: [ |
| 8 | + .library(name: "SwiftWin32", |
| 9 | + type: .dynamic, |
| 10 | + targets: ["SwiftWin32"]), |
| 11 | + .library(name: "SwiftWin32UI", |
| 12 | + type: .dynamic, |
| 13 | + targets: ["SwiftWin32UI"]), |
| 14 | + .executable(name: "UICatalog", targets: ["UICatalog"]), |
| 15 | + .executable(name: "Calculator", targets: ["Calculator"]), |
| 16 | + ], |
| 17 | + dependencies: [ |
| 18 | + .package(url: "https://github.com/apple/swift-log.git", |
| 19 | + .upToNextMajor(from: "1.4.3")), |
| 20 | + .package(url: "https://github.com/apple/swift-collections.git", |
| 21 | + .upToNextMinor(from: "1.0.0")), |
| 22 | + .package(url: "https://github.com/compnerd/cassowary.git", |
| 23 | + branch: "main"), |
| 24 | + .package(url: "https://github.com/compnerd/swift-com.git", |
| 25 | + revision: "ebbc617d3b7ba3a2023988a74bebd118deea4cc5"), |
| 26 | + ], |
| 27 | + targets: [ |
| 28 | + .target(name: "CoreAnimation", |
| 29 | + path: "Sources/SwiftWin32/CoreAnimation"), |
| 30 | + .target(name: "SwiftWin32", |
| 31 | + dependencies: [ |
| 32 | + "CoreAnimation", |
| 33 | + .product(name: "Logging", package: "swift-log"), |
| 34 | + .product(name: "OrderedCollections", |
| 35 | + package: "swift-collections"), |
| 36 | + .product(name: "cassowary", package: "cassowary"), |
| 37 | + .product(name: "SwiftCOM", package: "swift-com"), |
| 38 | + ], |
| 39 | + path: "Sources/SwiftWin32", |
| 40 | + exclude: ["CoreAnimation", "CMakeLists.txt"], |
| 41 | + linkerSettings: [ |
| 42 | + .linkedLibrary("User32"), |
| 43 | + .linkedLibrary("ComCtl32"), |
| 44 | + ]), |
| 45 | + .target(name: "SwiftWin32UI", |
| 46 | + dependencies: ["SwiftWin32"], |
| 47 | + path: "Sources/SwiftWin32UI", |
| 48 | + exclude: ["CMakeLists.txt"]), |
| 49 | + .executableTarget(name: "Calculator", |
| 50 | + dependencies: ["SwiftWin32"], |
| 51 | + path: "Examples/Calculator", |
| 52 | + exclude: [ |
| 53 | + "CMakeLists.txt", |
| 54 | + "Calculator.exe.manifest", |
| 55 | + "Info.plist", |
| 56 | + ], |
| 57 | + swiftSettings: [ |
| 58 | + .unsafeFlags(["-parse-as-library"]) |
| 59 | + ]), |
| 60 | + .executableTarget(name: "UICatalog", |
| 61 | + dependencies: ["SwiftWin32"], |
| 62 | + path: "Examples/UICatalog", |
| 63 | + exclude: [ |
| 64 | + "CMakeLists.txt", |
| 65 | + "Info.plist", |
| 66 | + "UICatalog.exe.manifest", |
| 67 | + ], |
| 68 | + resources: [ |
| 69 | + .copy("Assets/CoffeeCup.jpg") |
| 70 | + ], |
| 71 | + swiftSettings: [ |
| 72 | + .unsafeFlags(["-parse-as-library"]) |
| 73 | + ]), |
| 74 | + .target(name: "TestUtilities", path: "Tests/Utilities"), |
| 75 | + .testTarget(name: "AutoLayoutTests", dependencies: ["SwiftWin32"]), |
| 76 | + .testTarget(name: "CoreGraphicsTests", dependencies: ["SwiftWin32"]), |
| 77 | + .testTarget(name: "SupportTests", dependencies: ["SwiftWin32"]), |
| 78 | + .testTarget(name: "UICoreTests", |
| 79 | + dependencies: ["SwiftWin32", "TestUtilities"]) |
| 80 | + ]) |
0 commit comments