From 6e380de021d7febbf034402c7df1a4f22167330c Mon Sep 17 00:00:00 2001 From: SotoiGhost Date: Thu, 30 Jan 2020 10:51:11 -0600 Subject: [PATCH] Fixed a bug where some fat frameworks were not build correctly --- common.cake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/common.cake b/common.cake index 94cbd0c8e..9f9b2ab63 100644 --- a/common.cake +++ b/common.cake @@ -261,6 +261,7 @@ void BuildXcodeFatFramework (FilePath xcodeProject, PodSpec [] podSpecs, Platfor } workingDirectory = workingDirectory ?? Directory("./externals/"); + buildSettings = buildSettings ?? new Dictionary (); foreach (var podSpec in podSpecs) { var target = podSpec.TargetName; @@ -277,8 +278,12 @@ void BuildXcodeFatFramework (FilePath xcodeProject, PodSpec [] podSpecs, Platfor if (DirectoryExists (platformFrameworkPath)) continue; - var buildPath = buildSettings != null && buildSettings.ContainsKey ("SYMROOT") ? - Directory (buildSettings ["SYMROOT"]) : workingDirectory.Combine ("build"); + var buildSettingsCopy = new Dictionary (buildSettings); + + if (!buildSettingsCopy.ContainsKey ("SYMROOT")) + buildSettingsCopy ["SYMROOT"] = MakeAbsolute (workingDirectory.Combine ($"build-{arch}")).FullPath; + + var buildPath = Directory (buildSettingsCopy ["SYMROOT"]).Path; XCodeBuild (new XCodeBuildSettings { Project = workingDirectory.CombineWithFilePath (xcodeProject).ToString (), @@ -287,7 +292,7 @@ void BuildXcodeFatFramework (FilePath xcodeProject, PodSpec [] podSpecs, Platfor Arch = arch, Configuration = "Release", Verbose = true, - BuildSettings = buildSettings + BuildSettings = buildSettingsCopy }); var releasePath = buildPath.Combine ($"Release-{sdk}");