// swift-tools-version:5.9 import PackageDescription let package = Package( name: "MiniTerm", platforms: [ .macOS(.v13) ], dependencies: [ // Pin to a tag instead of `branch` if you prefer reproducible builds, // e.g. .package(url: "...", from: "1.2.0") .package(url: "https://github.com/migueldeicaza/SwiftTerm.git", branch: "main") ], targets: [ // C-Modul für die libghostty-C-API (Header in Sources/CGhostty/include). .target(name: "CGhostty"), .executableTarget( name: "MiniTerm", dependencies: ["SwiftTerm", "CGhostty"], linkerSettings: [ // Vorgebaute statische libghostty (siehe vendor/libghostty/README.md). // Pfad relativ zum Paketwurzelverzeichnis (so ruft make-app.sh `swift build`). .unsafeFlags(["-L", "vendor/libghostty/lib", "-lghostty"]), // Frameworks, die libghostty (Metal-Renderer, Fonts, Surface) braucht. .linkedFramework("AppKit"), .linkedFramework("Metal"), .linkedFramework("MetalKit"), .linkedFramework("QuartzCore"), .linkedFramework("CoreText"), .linkedFramework("CoreGraphics"), .linkedFramework("CoreVideo"), .linkedFramework("IOSurface"), .linkedFramework("Carbon"), .linkedLibrary("c++"), ] ) ] )