mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Merge pull request #40 from yonaskolb/info_plist
Automatically find Info.plist
This commit is contained in:
@@ -168,9 +168,21 @@ public class PBXProjGenerator {
|
||||
sourceFilePaths += sourceGroups.filePaths
|
||||
}
|
||||
|
||||
// find all Info.plist
|
||||
let infoPlists: [Path] = sourcePaths.reduce([]) {
|
||||
$0 + ((try? $1.recursiveChildren()) ?? []).filter { $0.lastComponent == "Info.plist" }
|
||||
}
|
||||
|
||||
let configs: [XCBuildConfiguration] = spec.configs.map { config in
|
||||
var buildSettings = spec.getTargetBuildSettings(target: target, config: config)
|
||||
|
||||
// automatically set INFOPLIST_FILE path
|
||||
if buildSettings["INFOPLIST_FILE"] == nil {
|
||||
if let plistPath = infoPlists.first {
|
||||
buildSettings["INFOPLIST_FILE"] = plistPath.byRemovingBase(path: basePath)
|
||||
}
|
||||
}
|
||||
|
||||
// set Carthage search paths
|
||||
if !carthageFrameworks.isEmpty {
|
||||
let frameworkSearchPaths = "FRAMEWORK_SEARCH_PATHS"
|
||||
|
||||
Reference in New Issue
Block a user