File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -146,15 +146,35 @@ extension SwiftModule {
146
146
}
147
147
}
148
148
149
+ var headerSearchPaths : ( key: String , value: String ) ? {
150
+ let headerPathKey = " HEADER_SEARCH_PATHS "
151
+ let headerPaths = dependencies. filter { $0 is CModule } . map { ( $0 as! CModule ) . path}
152
+
153
+ guard !headerPaths. isEmpty else { return nil }
154
+
155
+ if headerPaths. count == 1 , let first = headerPaths. first {
156
+ return ( headerPathKey, first)
157
+ }
158
+
159
+ let headerPathValue = " ( " + headerPaths. map ( { " \" \( $0) \" " } ) . joined ( separator: " , " ) + " ) "
160
+
161
+ return ( headerPathKey, headerPathValue)
162
+ }
163
+
149
164
var debugBuildSettings : String {
150
165
var buildSettings = commonBuildSettings
151
166
buildSettings [ " SWIFT_OPTIMIZATION_LEVEL " ] = " -Onone "
152
-
167
+ if let headerSearchPaths = headerSearchPaths {
168
+ buildSettings [ headerSearchPaths. key] = headerSearchPaths. value
169
+ }
153
170
return buildSettings. map { " \( $0) = \( $1) ; " } . joined ( separator: " " )
154
171
}
155
172
156
173
var releaseBuildSettings : String {
157
- let buildSettings = commonBuildSettings
174
+ var buildSettings = commonBuildSettings
175
+ if let headerSearchPaths = headerSearchPaths {
176
+ buildSettings [ headerSearchPaths. key] = headerSearchPaths. value
177
+ }
158
178
return buildSettings. map { " \( $0) = \( $1) ; " } . joined ( separator: " " )
159
179
}
160
180
You can’t perform that action at this time.
0 commit comments