mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
load setting preset for combination of product and platform
This commit is contained in:
@@ -34,6 +34,7 @@ extension ProjectSpec {
|
||||
|
||||
buildSettings += SettingsPresetFile.platform(target.platform).getBuildSettings()
|
||||
buildSettings += SettingsPresetFile.product(target.type).getBuildSettings()
|
||||
buildSettings += SettingsPresetFile.productPlatform(target.type, target.platform).getBuildSettings()
|
||||
buildSettings += getBuildSettings(settings: target.settings, config: config)
|
||||
|
||||
return buildSettings
|
||||
@@ -76,7 +77,7 @@ extension SettingsPresetFile {
|
||||
switch self {
|
||||
case .base, .config, .platform:
|
||||
print("No \"\(name)\" settings found at \(settingsPath)")
|
||||
case .product:
|
||||
case .product, .productPlatform:
|
||||
break
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -14,6 +14,7 @@ public enum SettingsPresetFile {
|
||||
case config(ConfigType)
|
||||
case platform(Platform)
|
||||
case product(PBXProductType)
|
||||
case productPlatform(PBXProductType,Platform)
|
||||
case base
|
||||
|
||||
var path: String {
|
||||
@@ -21,6 +22,7 @@ public enum SettingsPresetFile {
|
||||
case let .config(config): return "Configs/\(config.rawValue)"
|
||||
case let .platform(platform): return "Platforms/\(platform.rawValue)"
|
||||
case let .product(product): return "Products/\(product.name)"
|
||||
case let .productPlatform(product, platform): return "Product_Platform/\(product.name)_\(platform.rawValue)"
|
||||
case .base: return "base"
|
||||
}
|
||||
}
|
||||
@@ -30,6 +32,7 @@ public enum SettingsPresetFile {
|
||||
case let .config(config): return "\(config.rawValue) config"
|
||||
case let .platform(platform): return platform.rawValue
|
||||
case let .product(product): return product.name
|
||||
case let .productPlatform(product, platform): return "\(platform) \(product)"
|
||||
case .base: return "base"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user