@@ -55,7 +55,7 @@ public final class PIFProjectTester {
55
55
fileprivate init ( project: PIF . Project , targetMap: [ PIF . GUID : PIF . BaseTarget ] ) throws {
56
56
self . project = project
57
57
self . targetMap = targetMap
58
- self . fileMap = try collectFiles ( from: project. groupTree, parentPath: project. path, projectPath: project. path)
58
+ self . fileMap = try collectFiles ( from: project. groupTree, parentPath: project. path, projectPath: project. path, builtProductsPath : project . path )
59
59
}
60
60
61
61
public func checkTarget( _ guid: PIF . GUID , file: StaticString = #file, line: UInt = #line, body: ( ( PIFTargetTester ) -> Void ) ? = nil ) {
@@ -291,7 +291,8 @@ public final class PIFBuildSettingsTester {
291
291
private func collectFiles(
292
292
from reference: PIF . Reference ,
293
293
parentPath: AbsolutePath ,
294
- projectPath: AbsolutePath
294
+ projectPath: AbsolutePath ,
295
+ builtProductsPath: AbsolutePath
295
296
) throws -> [ PIF . GUID : String ] {
296
297
let referencePath : AbsolutePath
297
298
switch reference. sourceTree {
@@ -302,7 +303,7 @@ private func collectFiles(
302
303
case . sourceRoot:
303
304
referencePath = try AbsolutePath ( validating: reference. path, relativeTo: projectPath)
304
305
case . builtProductsDir:
305
- return [ : ]
306
+ referencePath = try AbsolutePath ( validating : reference . path , relativeTo : builtProductsPath )
306
307
}
307
308
308
309
var files : [ PIF . GUID : String ] = [ : ]
@@ -312,7 +313,7 @@ private func collectFiles(
312
313
files [ reference. guid] = referencePath. pathString
313
314
} else if let group = reference as? PIF . Group {
314
315
for child in group. children {
315
- let childFiles = try collectFiles ( from: child, parentPath: referencePath, projectPath: projectPath)
316
+ let childFiles = try collectFiles ( from: child, parentPath: referencePath, projectPath: projectPath, builtProductsPath : builtProductsPath )
316
317
files. merge ( childFiles, uniquingKeysWith: { _, _ in fatalError ( " non-unique GUID " ) } )
317
318
}
318
319
}
0 commit comments