// swift-tools-version: 6.0 import PackageDescription 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(url: "https://github.com/Lakr233/MSDisplayLink.git", from: "2.1.0"), ], 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", url: "__DOWNLOAD_URL__", checksum: "__CHECKSUM__" ), .testTarget( name: "GhosttyKitTest", dependencies: ["GhosttyKit", "GhosttyTerminal", "GhosttyTheme", "ShellCraftKit"] ), ] )