File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 10
10
11
11
import TSCBasic
12
12
import PackageModel
13
+ import Foundation
13
14
14
15
public let moduleMapFilename = " module.modulemap "
15
16
17
+ extension AbsolutePath {
18
+ fileprivate var moduleEscapedPathString : String {
19
+ return self . pathString. replacingOccurrences ( of: " \\ " , with: " \\ \\ " )
20
+ }
21
+ }
22
+
16
23
/// A protocol for targets which might have a modulemap.
17
24
protocol ModuleMapProtocol {
18
25
var moduleMapPath : AbsolutePath { get }
@@ -152,9 +159,9 @@ public struct ModuleMapGenerator {
152
159
stream <<< " module \( target. c99name) { \n "
153
160
switch type {
154
161
case . header( let header) :
155
- stream <<< " umbrella header \" \( header. pathString ) \" \n "
162
+ stream <<< " umbrella header \" \( header. moduleEscapedPathString ) \" \n "
156
163
case . directory( let path) :
157
- stream <<< " umbrella \" \( path. pathString ) \" \n "
164
+ stream <<< " umbrella \" \( path. moduleEscapedPathString ) \" \n "
158
165
}
159
166
stream <<< " export * \n "
160
167
stream <<< " } \n "
You can’t perform that action at this time.
0 commit comments