Navigation Menu

Skip to content

Commit

Permalink
Projucer: Migrate old iOS deployment target setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ed95 committed Jul 16, 2021
1 parent 40b46f8 commit 79f1ffe
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
Expand Up @@ -953,21 +953,22 @@ class XcodeProjectExporter : public ProjectExporter

void updateOldSDKDefaults()
{
if (config[Ids::iosCompatibility].toString() == "default") iosDeploymentTarget.resetToDefault();
if (macOSArchitecture.get() == "default") macOSArchitecture.resetToDefault();
if (macOSArchitecture.get() == "default")
macOSArchitecture.resetToDefault();

const auto updateSDKString = [this] (const Identifier& propertyName, ValueWithDefault& value)
const auto updateSDKString = [this] (const Identifier& propertyName, ValueWithDefault& value, const String& suffix)
{
auto sdkString = config[propertyName].toString();

if (sdkString == "default")
value.resetToDefault();
else if (sdkString.isNotEmpty() && sdkString.contains (" SDK"))
value = sdkString.upToFirstOccurrenceOf (" SDK", false, false);
else if (sdkString.isNotEmpty() && sdkString.endsWith (suffix))
value = sdkString.upToLastOccurrenceOf (suffix, false, false);
};

updateSDKString (Ids::osxSDK, macOSBaseSDK);
updateSDKString (Ids::osxCompatibility, macOSDeploymentTarget);
updateSDKString (Ids::osxSDK, macOSBaseSDK, " SDK");
updateSDKString (Ids::osxCompatibility, macOSDeploymentTarget, " SDK");
updateSDKString (Ids::iosCompatibility, iosDeploymentTarget, {});
}
};

Expand Down

0 comments on commit 79f1ffe

Please sign in to comment.