mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
add support for localPackages
This commit is contained in:
@@ -48,6 +48,12 @@ public class PBXProjGenerator {
|
||||
try sourceGenerator.getFileGroups(path: group)
|
||||
}
|
||||
|
||||
let localPackages = Set(project.localPackages)
|
||||
for package in localPackages {
|
||||
let path = project.basePath + Path(package).normalize()
|
||||
sourceGenerator.createLocalPackage(path: path)
|
||||
}
|
||||
|
||||
let buildConfigs: [XCBuildConfiguration] = project.configs.map { config in
|
||||
let buildSettings = project.getProjectBuildSettings(config: config)
|
||||
var baseConfiguration: PBXFileReference?
|
||||
|
||||
@@ -41,6 +41,18 @@ class SourceGenerator {
|
||||
return object
|
||||
}
|
||||
|
||||
func createLocalPackage(path: Path) {
|
||||
let fileReference = addObject(
|
||||
PBXFileReference(
|
||||
sourceTree: .absolute,
|
||||
name: path.lastComponent,
|
||||
lastKnownFileType: "folder",
|
||||
path: path.string
|
||||
)
|
||||
)
|
||||
rootGroups.insert(fileReference)
|
||||
}
|
||||
|
||||
func getAllSourceFiles(targetType: PBXProductType, sources: [TargetSource]) throws -> [SourceFile] {
|
||||
return try sources.flatMap { try getSourceFiles(targetType: targetType, targetSource: $0, path: project.basePath + $0.path) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user