mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Add support for conditionally linking dependencies based on platform (#1087)
* Add initial support for conditional platform dependencies * Add tests for conditional platforms * Update docs and changelog * Respond to PR feedback * Change name of field from 'conditionalPlatforms' to 'platforms' Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
This commit is contained in:
@@ -751,7 +751,7 @@ public class PBXProjGenerator {
|
||||
for dependency in targetDependencies {
|
||||
|
||||
let embed = dependency.embed ?? target.shouldEmbedDependencies
|
||||
let platform = makePlatform(for: dependency.platform)
|
||||
let platform = makePlatformFilter(for: dependency.platformFilter)
|
||||
|
||||
switch dependency.type {
|
||||
case .target:
|
||||
@@ -1320,8 +1320,8 @@ public class PBXProjGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
private func makePlatform(for platform: Dependency.Platform) -> String? {
|
||||
switch platform {
|
||||
private func makePlatformFilter(for filter: Dependency.PlatformFilter) -> String? {
|
||||
switch filter {
|
||||
case .all:
|
||||
return nil
|
||||
case .macOS:
|
||||
|
||||
Reference in New Issue
Block a user