@@ -63,29 +63,6 @@ let package = Package(
63
63
swiftSettings: swiftSettings
64
64
) ,
65
65
66
- // Command-line tool library
67
- . target(
68
- name: " SwiftDocCUtilities " ,
69
- dependencies: [
70
- . target( name: " SwiftDocC " ) ,
71
- . product( name: " NIOHTTP1 " , package : " swift-nio " ) ,
72
- . product( name: " ArgumentParser " , package : " swift-argument-parser " )
73
- ] ,
74
- swiftSettings: swiftSettings
75
- ) ,
76
- . testTarget(
77
- name: " SwiftDocCUtilitiesTests " ,
78
- dependencies: [
79
- . target( name: " SwiftDocCUtilities " ) ,
80
- . target( name: " SwiftDocC " ) ,
81
- . target( name: " SwiftDocCTestUtilities " ) ,
82
- ] ,
83
- resources: [
84
- . copy( " Test Resources " ) ,
85
- . copy( " Test Bundles " ) ,
86
- ] ,
87
- swiftSettings: swiftSettings
88
- ) ,
89
66
// Test utility library
90
67
. target(
91
68
name: " SwiftDocCTestUtilities " ,
@@ -126,20 +103,74 @@ let package = Package(
126
103
]
127
104
)
128
105
106
+ // Command-line tool library
107
+ #if os(Windows)
108
+ package . targets. append (
109
+ . target(
110
+ name: " SwiftDocCUtilities " ,
111
+ dependencies: [
112
+ . target( name: " SwiftDocC " ) ,
113
+ . product( name: " ArgumentParser " , package : " swift-argument-parser " )
114
+ ] ,
115
+ exclude: [
116
+ // PreviewServer requires NIO which cannot support non-POSIX platforms.
117
+ " PreviewServer " ,
118
+ " Action/Actions/PreviewAction.swift " ,
119
+ " ArgumentParsing/ActionExtensions/PreviewAction+CommandInitialization.swift " ,
120
+ " ArgumentParsing/Subcommands/Preview.swift " ,
121
+ ] ,
122
+ swiftSettings: swiftSettings
123
+ )
124
+ )
125
+ #else
126
+ package . targets. append (
127
+ . target(
128
+ name: " SwiftDocCUtilities " ,
129
+ dependencies: [
130
+ . target( name: " SwiftDocC " ) ,
131
+ . product( name: " NIOHTTP1 " , package : " swift-nio " ) ,
132
+ . product( name: " ArgumentParser " , package : " swift-argument-parser " )
133
+ ] ,
134
+ swiftSettings: swiftSettings
135
+ )
136
+ )
137
+ #endif
138
+
139
+ package . targets. append (
140
+ . testTarget(
141
+ name: " SwiftDocCUtilitiesTests " ,
142
+ dependencies: [
143
+ . target( name: " SwiftDocCUtilities " ) ,
144
+ . target( name: " SwiftDocC " ) ,
145
+ . target( name: " SwiftDocCTestUtilities " ) ,
146
+ ] ,
147
+ resources: [
148
+ . copy( " Test Resources " ) ,
149
+ . copy( " Test Bundles " ) ,
150
+ ] ,
151
+ swiftSettings: swiftSettings
152
+ )
153
+ )
154
+
129
155
// If the `SWIFTCI_USE_LOCAL_DEPS` environment variable is set,
130
156
// we're building in the Swift.org CI system alongside other projects in the Swift toolchain and
131
157
// we can depend on local versions of our dependencies instead of fetching them remotely.
132
158
if ProcessInfo . processInfo. environment [ " SWIFTCI_USE_LOCAL_DEPS " ] == nil {
133
159
// Building standalone, so fetch all dependencies remotely.
134
160
package . dependencies += [
135
- . package ( url: " https://github.com/apple/swift-nio.git " , from: " 2.53.0 " ) ,
136
161
. package ( url: " https://github.com/apple/swift-markdown.git " , branch: " main " ) ,
137
162
. package ( url: " https://github.com/apple/swift-lmdb.git " , branch: " main " ) ,
138
163
. package ( url: " https://github.com/apple/swift-argument-parser " , from: " 1.2.2 " ) ,
139
164
. package ( url: " https://github.com/apple/swift-docc-symbolkit " , branch: " main " ) ,
140
165
. package ( url: " https://github.com/apple/swift-crypto.git " , from: " 2.5.0 " ) ,
141
166
. package ( url: " https://github.com/apple/swift-docc-plugin " , from: " 1.0.0 " ) ,
142
167
]
168
+
169
+ #if !os(Windows)
170
+ package . dependencies += [
171
+ . package ( url: " https://github.com/apple/swift-nio.git " , from: " 2.53.0 " ) ,
172
+ ]
173
+ #endif
143
174
} else {
144
175
// Building in the Swift.org CI system, so rely on local versions of dependencies.
145
176
package . dependencies += [
0 commit comments