// swift-tools-version: 5.9 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "audiotee", platforms: [ .macOS("14.2") ], products: [ // Library that can be imported by other packages .library( name: "AudioTeeCore", targets: ["AudioTeeCore"] ), // CLI executable .executable( name: "audiotee", targets: ["AudioTeeCLI"] ) ], targets: [ // Core library with all business logic .target( name: "AudioTeeCore", path: "Sources/AudioTeeCore" ), // CLI executable that uses the library .executableTarget( name: "AudioTeeCLI", dependencies: ["AudioTeeCore"], path: "Sources/AudioTeeCLI", exclude: ["Info.plist"], linkerSettings: [ // Embeds Info.plist directly into the Mach-O binary so it carries a // stable CFBundleIdentifier and the usage-description keys TCC needs, // without requiring a full .app bundle — see scripts/build-signed.sh. .unsafeFlags([ "-Xlinker", "-sectcreate", "-Xlinker", "__TEXT", "-Xlinker", "__info_plist", "-Xlinker", "Sources/AudioTeeCLI/Info.plist", ]) ] ), // Tests for the library .testTarget( name: "AudioTeeCoreTests", dependencies: ["AudioTeeCore"], path: "Tests/AudioTeeCoreTests" ) ] )