// swift-tools-version: 6.0 import PackageDescription // terminalX vendored 变体:改为 local-path 依赖,使 SPM 零网络解析 // (构建环境的认证代理不被 SwiftPM 支持)。 // 上游原始清单见 Package.swift.template / Package.local.swift。 // libghostty xcframework (storage.1.3.2) 已预置于 BinaryTarget/。 let package = Package( name: "GhosttyKit", platforms: [ .iOS(.v15), .macOS(.v13), .macCatalyst(.v15), ], products: [ .library(name: "GhosttyKit", targets: ["GhosttyKit"]), .library(name: "GhosttyTerminal", targets: ["GhosttyTerminal"]), .library(name: "ShellCraftKit", targets: ["ShellCraftKit"]), .library(name: "GhosttyTheme", targets: ["GhosttyTheme"]), ], dependencies: [ .package(path: "../MSDisplayLink"), ], targets: [ .target( name: "GhosttyKit", dependencies: ["libghostty"], path: "Sources/GhosttyKit", linkerSettings: [ .linkedLibrary("c++"), .linkedFramework("Carbon", .when(platforms: [.macOS])), ] ), .target( name: "GhosttyTerminal", dependencies: ["GhosttyKit", "MSDisplayLink"], path: "Sources/GhosttyTerminal" ), .target( name: "ShellCraftKit", dependencies: ["GhosttyTerminal"], path: "Sources/ShellCraftKit" ), .target( name: "GhosttyTheme", dependencies: ["GhosttyTerminal"], path: "Sources/GhosttyTheme", exclude: ["LICENSE"] ), .binaryTarget( name: "libghostty", path: "BinaryTarget/GhosttyKit.xcframework" ), .testTarget( name: "GhosttyKitTest", dependencies: ["GhosttyKit", "GhosttyTerminal", "GhosttyTheme", "ShellCraftKit"] ), ] )