@@ -28,6 +28,19 @@ let buildInfoTargets: [Target] = [
2828 )
2929]
3030
31+ let portableGraphicsDependencies : [ Target . Dependency ] = [
32+ . product(
33+ name: " PNG " ,
34+ package : " swift-png " ,
35+ condition: . when( platforms: [ . linux, . windows] )
36+ ) ,
37+ . product(
38+ name: " LZ77 " ,
39+ package : " swift-png " ,
40+ condition: . when( platforms: [ . linux, . windows] )
41+ ) ,
42+ ]
43+
3144#if os(Windows)
3245let products : [ Product ] = [
3346 . executable( name: " SwiftTermFuzz " , targets: [ " SwiftTermFuzz " ] ) ,
@@ -40,7 +53,7 @@ let products: [Product] = [
4053let targets : [ Target ] = [
4154 . target(
4255 name: " SwiftTerm " ,
43- dependencies: [ ] ,
56+ dependencies: portableGraphicsDependencies ,
4457 path: " Sources/SwiftTerm " ,
4558 exclude: platformExcludes + [ " Mac/README.md " ] ,
4659 plugins: [
@@ -61,7 +74,8 @@ let targets: [Target] = [
6174 path: " Tests/SwiftTermTests " ,
6275 resources: [
6376 . copy( " Fixtures/xterm-ghostty.infocmp " ) ,
64- . copy( " Fixtures/swifterm-terminfo.infocmp " )
77+ . copy( " Fixtures/swifterm-terminfo.infocmp " ) ,
78+ . copy( " KittyGraphics/Fixtures " )
6579 ]
6680 )
6781] + buildInfoTargets
@@ -79,6 +93,7 @@ let targets: [Target] = [
7993 . target(
8094 name: " SwiftTerm " ,
8195 //
96+ dependencies: portableGraphicsDependencies,
8297 // We can not use Swift Subprocess, because there is no way of configuring the child process to
8398 // be a controlling terminal, as it is posix-spawn based.
8499// dependencies: [
@@ -117,7 +132,8 @@ let targets: [Target] = [
117132 path: " Tests/SwiftTermTests " ,
118133 resources: [
119134 . copy( " Fixtures/xterm-ghostty.infocmp " ) ,
120- . copy( " Fixtures/swifterm-terminfo.infocmp " )
135+ . copy( " Fixtures/swifterm-terminfo.infocmp " ) ,
136+ . copy( " KittyGraphics/Fixtures " )
121137 ]
122138 )
123139] + buildInfoTargets
@@ -135,6 +151,7 @@ let package = Package(
135151 dependencies: [
136152 . package ( url: " https://github.com/apple/swift-argument-parser " , from: " 1.0.0 " ) ,
137153 . package ( url: " https://github.com/apple/swift-docc-plugin " , from: " 1.4.3 " ) ,
154+ . package ( url: " https://github.com/tayloraswift/swift-png " , from: " 4.5.0 " ) ,
138155 ] ,
139156// .package(url: "https://github.com/swiftlang/swift-subprocess", revision: "426790f3f24afa60b418450da0afaa20a8b3bdd4")
140157 targets: targets,
0 commit comments