|
|
@@ -23,7 +23,7 @@ |
|
|
|
*/
|
|
|
|
|
|
|
|
#include "../Application/jucer_Application.h"
|
|
|
|
|
|
|
|
#include "jucer_TextWithDefaultPropertyComponent.h"
|
|
|
|
|
|
|
|
namespace
|
|
|
|
{
|
|
|
@@ -335,51 +335,40 @@ protected: |
|
|
|
{
|
|
|
|
public:
|
|
|
|
XcodeBuildConfiguration (Project& p, const ValueTree& t, const bool isIOS, const ProjectExporter& e)
|
|
|
|
: BuildConfiguration (p, t, e), iOS (isIOS)
|
|
|
|
{
|
|
|
|
if (iOS)
|
|
|
|
{
|
|
|
|
if (getiOSCompatibilityVersion().isEmpty())
|
|
|
|
getiOSCompatibilityVersionValue() = osxVersionDefault;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (getMacSDKVersion().isEmpty())
|
|
|
|
getMacSDKVersionValue() = osxVersionDefault;
|
|
|
|
|
|
|
|
if (getMacCompatibilityVersion().isEmpty())
|
|
|
|
getMacCompatibilityVersionValue() = osxVersionDefault;
|
|
|
|
|
|
|
|
if (getMacArchitecture().isEmpty())
|
|
|
|
getMacArchitectureValue() = osxArch_Default;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
: BuildConfiguration (p, t, e),
|
|
|
|
iOS (isIOS),
|
|
|
|
osxSDKVersion (config, Ids::osxSDK, nullptr, "default"),
|
|
|
|
osxDeploymentTarget (config, Ids::osxCompatibility, nullptr, "default"),
|
|
|
|
iosDeploymentTarget (config, Ids::iosCompatibility, nullptr, "default"),
|
|
|
|
osxArchitecture (config, Ids::osxArchitecture, nullptr, "default"),
|
|
|
|
customXcodeFlags (config, Ids::customXcodeFlags, nullptr),
|
|
|
|
cppLanguageStandard (config, Ids::cppLanguageStandard, nullptr),
|
|
|
|
cppStandardLibrary (config, Ids::cppLibType, nullptr),
|
|
|
|
codeSignIdentity (config, Ids::codeSigningIdentity, nullptr, iOS ? "iPhone Developer" : "Mac Developer"),
|
|
|
|
fastMathEnabled (config, Ids::fastMath, nullptr),
|
|
|
|
linkTimeOptimisationEnabled (config, Ids::linkTimeOptimisation, nullptr),
|
|
|
|
vstBinaryLocation (config, Ids::xcodeVstBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST/"),
|
|
|
|
vst3BinaryLocation (config, Ids::xcodeVst3BinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST3/"),
|
|
|
|
auBinaryLocation (config, Ids::xcodeAudioUnitBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/Components/"),
|
|
|
|
rtasBinaryLocation (config, Ids::xcodeRtasBinaryLocation, nullptr, "/Library/Application Support/Avid/Audio/Plug-Ins/"),
|
|
|
|
aaxBinaryLocation (config, Ids::xcodeAaxBinaryLocation, nullptr, "/Library/Application Support/Digidesign/Plug-Ins/")
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
bool iOS;
|
|
|
|
|
|
|
|
Value getMacSDKVersionValue() { return getValue (Ids::osxSDK); }
|
|
|
|
String getMacSDKVersion() const { return config [Ids::osxSDK]; }
|
|
|
|
Value getMacCompatibilityVersionValue() { return getValue (Ids::osxCompatibility); }
|
|
|
|
String getMacCompatibilityVersion() const { return config [Ids::osxCompatibility]; }
|
|
|
|
Value getiOSCompatibilityVersionValue() { return getValue (Ids::iosCompatibility); }
|
|
|
|
String getiOSCompatibilityVersion() const { return config [Ids::iosCompatibility]; }
|
|
|
|
Value getMacArchitectureValue() { return getValue (Ids::osxArchitecture); }
|
|
|
|
String getMacArchitecture() const { return config [Ids::osxArchitecture]; }
|
|
|
|
Value getCustomXcodeFlagsValue() { return getValue (Ids::customXcodeFlags); }
|
|
|
|
String getCustomXcodeFlags() const { return config [Ids::customXcodeFlags]; }
|
|
|
|
Value getCppLanguageStandardValue() { return getValue (Ids::cppLanguageStandard); }
|
|
|
|
String getCppLanguageStandard() const { return config [Ids::cppLanguageStandard]; }
|
|
|
|
Value getCppLibTypeValue() { return getValue (Ids::cppLibType); }
|
|
|
|
String getCppLibType() const { return config [Ids::cppLibType]; }
|
|
|
|
Value getCodeSignIdentityValue() { return getValue (Ids::codeSigningIdentity); }
|
|
|
|
String getCodeSignIdentity() const { return config [Ids::codeSigningIdentity]; }
|
|
|
|
Value getFastMathValue() { return getValue (Ids::fastMath); }
|
|
|
|
bool isFastMathEnabled() const { return config [Ids::fastMath]; }
|
|
|
|
Value getLinkTimeOptimisationValue() { return getValue (Ids::linkTimeOptimisation); }
|
|
|
|
bool isLinkTimeOptimisationEnabled() const { return config [Ids::linkTimeOptimisation]; }
|
|
|
|
CachedValue<String> osxSDKVersion, osxDeploymentTarget, iosDeploymentTarget, osxArchitecture,
|
|
|
|
customXcodeFlags, cppLanguageStandard, cppStandardLibrary, codeSignIdentity;
|
|
|
|
CachedValue<bool> fastMathEnabled, linkTimeOptimisationEnabled;
|
|
|
|
CachedValue<String> vstBinaryLocation, vst3BinaryLocation, auBinaryLocation, rtasBinaryLocation, aaxBinaryLocation;
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
var getDefaultOptimisationLevel() const override { return var ((int) (isDebug() ? gccO0 : gccO3)); }
|
|
|
|
|
|
|
|
void createConfigProperties (PropertyListBuilder& props) override
|
|
|
|
{
|
|
|
|
addXcodePluginInstallPathProperties (props);
|
|
|
|
addGCCOptimisationProperty (props);
|
|
|
|
|
|
|
|
if (iOS)
|
|
|
@@ -387,7 +376,7 @@ protected: |
|
|
|
const char* iosVersions[] = { "Use Default", "7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "8.4", "9.0", "9.1", "9.2", "9.3", 0 };
|
|
|
|
const char* iosVersionValues[] = { osxVersionDefault, "7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "8.4", "9.0", "9.1", "9.2", "9.3", 0 };
|
|
|
|
|
|
|
|
props.add (new ChoicePropertyComponent (getiOSCompatibilityVersionValue(), "iOS Deployment Target",
|
|
|
|
props.add (new ChoicePropertyComponent (iosDeploymentTarget.getPropertyAsValue(), "iOS Deployment Target",
|
|
|
|
StringArray (iosVersions), Array<var> (iosVersionValues)),
|
|
|
|
"The minimum version of iOS that the target binary will run on.");
|
|
|
|
}
|
|
|
@@ -407,10 +396,10 @@ protected: |
|
|
|
versionValues.add (getSDKName (ver));
|
|
|
|
}
|
|
|
|
|
|
|
|
props.add (new ChoicePropertyComponent (getMacSDKVersionValue(), "OSX Base SDK Version", sdkVersionNames, versionValues),
|
|
|
|
props.add (new ChoicePropertyComponent (osxSDKVersion.getPropertyAsValue(), "OSX Base SDK Version", sdkVersionNames, versionValues),
|
|
|
|
"The version of OSX to link against in the XCode build.");
|
|
|
|
|
|
|
|
props.add (new ChoicePropertyComponent (getMacCompatibilityVersionValue(), "OSX Deployment Target", osxVersionNames, versionValues),
|
|
|
|
props.add (new ChoicePropertyComponent (osxDeploymentTarget.getPropertyAsValue(), "OSX Deployment Target", osxVersionNames, versionValues),
|
|
|
|
"The minimum version of OSX that the target binary will be compatible with.");
|
|
|
|
|
|
|
|
const char* osxArch[] = { "Use Default", "Native architecture of build machine",
|
|
|
@@ -418,12 +407,12 @@ protected: |
|
|
|
const char* osxArchValues[] = { osxArch_Default, osxArch_Native, osxArch_32BitUniversal,
|
|
|
|
osxArch_64BitUniversal, osxArch_64Bit, 0 };
|
|
|
|
|
|
|
|
props.add (new ChoicePropertyComponent (getMacArchitectureValue(), "OSX Architecture",
|
|
|
|
props.add (new ChoicePropertyComponent (osxArchitecture.getPropertyAsValue(), "OSX Architecture",
|
|
|
|
StringArray (osxArch), Array<var> (osxArchValues)),
|
|
|
|
"The type of OSX binary that will be produced.");
|
|
|
|
}
|
|
|
|
|
|
|
|
props.add (new TextPropertyComponent (getCustomXcodeFlagsValue(), "Custom Xcode flags", 8192, false),
|
|
|
|
props.add (new TextPropertyComponent (customXcodeFlags.getPropertyAsValue(), "Custom Xcode flags", 8192, false),
|
|
|
|
"A comma-separated list of custom Xcode setting flags which will be appended to the list of generated flags, "
|
|
|
|
"e.g. MACOSX_DEPLOYMENT_TARGET_i386 = 10.5, VALID_ARCHS = \"ppc i386 x86_64\"");
|
|
|
|
|
|
|
@@ -437,7 +426,8 @@ protected: |
|
|
|
cppLanguageStandardValues.add ("c++14");
|
|
|
|
cppLanguageStandardValues.add ("gnu++14");
|
|
|
|
|
|
|
|
props.add (new ChoicePropertyComponent (getCppLanguageStandardValue(), "C++ Language Standard", StringArray (cppLanguageStandardNames), cppLanguageStandardValues),
|
|
|
|
props.add (new ChoicePropertyComponent (cppLanguageStandard.getPropertyAsValue(), "C++ Language Standard",
|
|
|
|
StringArray (cppLanguageStandardNames), cppLanguageStandardValues),
|
|
|
|
"The standard of the C++ language that will be used for compilation.");
|
|
|
|
|
|
|
|
const char* cppLibNames[] = { "Use Default", "LLVM libc++", "GNU libstdc++", nullptr };
|
|
|
@@ -446,20 +436,43 @@ protected: |
|
|
|
cppLibValues.add ("libc++");
|
|
|
|
cppLibValues.add ("libstdc++");
|
|
|
|
|
|
|
|
props.add (new ChoicePropertyComponent (getCppLibTypeValue(), "C++ Library", StringArray (cppLibNames), cppLibValues),
|
|
|
|
props.add (new ChoicePropertyComponent (cppStandardLibrary.getPropertyAsValue(), "C++ Library", StringArray (cppLibNames), cppLibValues),
|
|
|
|
"The type of C++ std lib that will be linked.");
|
|
|
|
|
|
|
|
props.add (new TextPropertyComponent (getCodeSignIdentityValue(), "Code-signing Identity", 8192, false),
|
|
|
|
props.add (new TextWithDefaultPropertyComponent<String> (codeSignIdentity, "Code-signing Identity", 1024),
|
|
|
|
"The name of a code-signing identity for Xcode to apply.");
|
|
|
|
|
|
|
|
props.add (new BooleanPropertyComponent (getFastMathValue(), "Relax IEEE compliance", "Enabled"),
|
|
|
|
props.add (new BooleanPropertyComponent (fastMathEnabled.getPropertyAsValue(), "Relax IEEE compliance", "Enabled"),
|
|
|
|
"Enable this to use FAST_MATH non-IEEE mode. (Warning: this can have unexpected results!)");
|
|
|
|
|
|
|
|
props.add (new BooleanPropertyComponent (getLinkTimeOptimisationValue(), "Link-Time Optimisation", "Enabled"),
|
|
|
|
props.add (new BooleanPropertyComponent (linkTimeOptimisationEnabled.getPropertyAsValue(), "Link-Time Optimisation", "Enabled"),
|
|
|
|
"Enable this to perform link-time code generation. This is recommended for release builds.");
|
|
|
|
}
|
|
|
|
|
|
|
|
bool iOS;
|
|
|
|
private:
|
|
|
|
//==========================================================================
|
|
|
|
void addXcodePluginInstallPathProperties (PropertyListBuilder& props)
|
|
|
|
{
|
|
|
|
if (project.shouldBuildVST().getValue())
|
|
|
|
props.add (new TextWithDefaultPropertyComponent<String> (vstBinaryLocation, "VST Binary location", 1024),
|
|
|
|
"The folder in which the compiled VST binary should be placed.");
|
|
|
|
|
|
|
|
if (project.shouldBuildVST3().getValue())
|
|
|
|
props.add (new TextWithDefaultPropertyComponent<String> (vst3BinaryLocation, "VST3 Binary location", 1024),
|
|
|
|
"The folder in which the compiled VST3 binary should be placed.");
|
|
|
|
|
|
|
|
if (project.shouldBuildAU().getValue())
|
|
|
|
props.add (new TextWithDefaultPropertyComponent<String> (auBinaryLocation, "AU Binary location", 1024),
|
|
|
|
"The folder in which the compiled AU binary should be placed.");
|
|
|
|
|
|
|
|
if (project.shouldBuildRTAS().getValue())
|
|
|
|
props.add (new TextWithDefaultPropertyComponent<String> (rtasBinaryLocation, "RTAS Binary location", 1024),
|
|
|
|
"The folder in which the compiled RTAS binary should be placed.");
|
|
|
|
|
|
|
|
if (project.shouldBuildAAX().getValue())
|
|
|
|
props.add (new TextWithDefaultPropertyComponent<String> (aaxBinaryLocation, "AAX Binary location", 1024),
|
|
|
|
"The folder in which the compiled AAX binary should be placed.");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
BuildConfiguration::Ptr createBuildConfig (const ValueTree& v) const override
|
|
|
@@ -525,7 +538,6 @@ public: |
|
|
|
xcodeFileType = "wrapper.application";
|
|
|
|
xcodeBundleExtension = ".app";
|
|
|
|
xcodeProductType = "com.apple.product-type.application";
|
|
|
|
xcodeProductInstallPath = "$(HOME)/Applications";
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = false;
|
|
|
|
break;
|
|
|
|
|
|
|
@@ -536,7 +548,6 @@ public: |
|
|
|
xcodeFileType = "compiled.mach-o.executable";
|
|
|
|
xcodeBundleExtension = String::empty;
|
|
|
|
xcodeProductType = "com.apple.product-type.tool";
|
|
|
|
xcodeProductInstallPath = "/usr/bin";
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = false;
|
|
|
|
break;
|
|
|
|
|
|
|
@@ -546,7 +557,6 @@ public: |
|
|
|
xcodeCreatePList = false;
|
|
|
|
xcodeFileType = "archive.ar";
|
|
|
|
xcodeProductType = "com.apple.product-type.library.static";
|
|
|
|
xcodeProductInstallPath = String::empty;
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = false;
|
|
|
|
break;
|
|
|
|
|
|
|
@@ -557,7 +567,6 @@ public: |
|
|
|
xcodeFileType = "compiled.mach-o.dylib";
|
|
|
|
xcodeProductType = "com.apple.product-type.library.dynamic";
|
|
|
|
xcodeBundleExtension = ".dylib";
|
|
|
|
xcodeProductInstallPath = String::empty;
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = false;
|
|
|
|
|
|
|
|
break;
|
|
|
@@ -571,7 +580,6 @@ public: |
|
|
|
xcodeFileType = "wrapper.cfbundle";
|
|
|
|
xcodeBundleExtension = ".vst";
|
|
|
|
xcodeProductType = "com.apple.product-type.bundle";
|
|
|
|
xcodeProductInstallPath = "$(HOME)/Library/Audio/Plug-Ins/VST/";
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = true;
|
|
|
|
|
|
|
|
break;
|
|
|
@@ -585,7 +593,6 @@ public: |
|
|
|
xcodeFileType = "wrapper.cfbundle";
|
|
|
|
xcodeBundleExtension = ".vst3";
|
|
|
|
xcodeProductType = "com.apple.product-type.bundle";
|
|
|
|
xcodeProductInstallPath = "$(HOME)/Library/Audio/Plug-Ins/VST3/";
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = true;
|
|
|
|
|
|
|
|
break;
|
|
|
@@ -599,7 +606,6 @@ public: |
|
|
|
xcodeFileType = "wrapper.cfbundle";
|
|
|
|
xcodeBundleExtension = ".component";
|
|
|
|
xcodeProductType = "com.apple.product-type.bundle";
|
|
|
|
xcodeProductInstallPath = "$(HOME)/Library/Audio/Plug-Ins/Components/";
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = true;
|
|
|
|
|
|
|
|
addExtraAudioUnitTargetSettings();
|
|
|
@@ -615,7 +621,6 @@ public: |
|
|
|
xcodeFileType = "wrapper.application";
|
|
|
|
xcodeBundleExtension = ".app";
|
|
|
|
xcodeProductType = "com.apple.product-type.application";
|
|
|
|
xcodeProductInstallPath = "$(HOME)/Applications";
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = false;
|
|
|
|
break;
|
|
|
|
|
|
|
@@ -629,7 +634,6 @@ public: |
|
|
|
xcodeBundleExtension = ".appex";
|
|
|
|
xcodeBundleIDSubPath = "AUv3";
|
|
|
|
xcodeProductType = "com.apple.product-type.app-extension";
|
|
|
|
xcodeProductInstallPath = String::empty;
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = false;
|
|
|
|
|
|
|
|
addExtraAudioUnitv3PlugInTargetSettings();
|
|
|
@@ -644,7 +648,6 @@ public: |
|
|
|
xcodeFileType = "wrapper.cfbundle";
|
|
|
|
xcodeBundleExtension = ".aaxplugin";
|
|
|
|
xcodeProductType = "com.apple.product-type.bundle";
|
|
|
|
xcodeProductInstallPath = "/Library/Application Support/Avid/Audio/Plug-Ins/";
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = true;
|
|
|
|
|
|
|
|
addExtraAAXTargetSettings();
|
|
|
@@ -659,7 +662,6 @@ public: |
|
|
|
xcodeFileType = "wrapper.cfbundle";
|
|
|
|
xcodeBundleExtension = ".dpm";
|
|
|
|
xcodeProductType = "com.apple.product-type.bundle";
|
|
|
|
xcodeProductInstallPath = "/Library/Application Support/Digidesign/Plug-Ins/";
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = true;
|
|
|
|
|
|
|
|
addExtraRTASTargetSettings();
|
|
|
@@ -675,7 +677,6 @@ public: |
|
|
|
xcodeBundleExtension = ".framework";
|
|
|
|
xcodeProductType = "com.apple.product-type.framework";
|
|
|
|
xcodeBundleIDSubPath = "Framework";
|
|
|
|
xcodeProductInstallPath = owner.isiOS() ? "@executable_path/Frameworks" : "@executable_path/../Frameworks";
|
|
|
|
xcodeCopyToProductInstallPathAfterBuild = false;
|
|
|
|
|
|
|
|
break;
|
|
|
@@ -739,7 +740,7 @@ public: |
|
|
|
}
|
|
|
|
|
|
|
|
String xcodePackageType, xcodeBundleSignature, xcodeBundleExtension;
|
|
|
|
String xcodeProductType, xcodeProductInstallPath, xcodeFileType;
|
|
|
|
String xcodeProductType, xcodeFileType;
|
|
|
|
String xcodeOtherRezFlags, xcodeExcludedFiles64Bit, xcodeBundleIDSubPath;
|
|
|
|
bool xcodeIsBundle, xcodeCreatePList, xcodeIsExecutable, xcodeCopyToProductInstallPathAfterBuild;
|
|
|
|
StringArray xcodeFrameworks, xcodeLibs;
|
|
|
@@ -885,7 +886,7 @@ public: |
|
|
|
|
|
|
|
s.add ("PRODUCT_BUNDLE_IDENTIFIER = " + bundleIdentifier);
|
|
|
|
|
|
|
|
const String arch ((! owner.isiOS() && type == Target::AudioUnitv3PlugIn) ? osxArch_64Bit : config.getMacArchitecture());
|
|
|
|
const String arch ((! owner.isiOS() && type == Target::AudioUnitv3PlugIn) ? osxArch_64Bit : config.osxArchitecture.get());
|
|
|
|
if (arch == osxArch_Native) s.add ("ARCHS = \"$(NATIVE_ARCH_ACTUAL)\"");
|
|
|
|
else if (arch == osxArch_32BitUniversal) s.add ("ARCHS = \"$(ARCHS_STANDARD_32_BIT)\"");
|
|
|
|
else if (arch == osxArch_64BitUniversal) s.add ("ARCHS = \"$(ARCHS_STANDARD_32_64_BIT)\"");
|
|
|
@@ -897,19 +898,21 @@ public: |
|
|
|
if (xcodeCreatePList)
|
|
|
|
s.add ("INFOPLIST_FILE = " + infoPlistFile.getFileName());
|
|
|
|
|
|
|
|
if (config.isLinkTimeOptimisationEnabled())
|
|
|
|
if (config.linkTimeOptimisationEnabled.get())
|
|
|
|
s.add ("LLVM_LTO = YES");
|
|
|
|
|
|
|
|
if (config.isFastMathEnabled())
|
|
|
|
if (config.fastMathEnabled.get())
|
|
|
|
s.add ("GCC_FAST_MATH = YES");
|
|
|
|
|
|
|
|
const String extraFlags (owner.replacePreprocessorTokens (config, owner.getExtraCompilerFlagsString()).trim());
|
|
|
|
if (extraFlags.isNotEmpty())
|
|
|
|
s.add ("OTHER_CPLUSPLUSFLAGS = \"" + extraFlags + "\"");
|
|
|
|
|
|
|
|
if (xcodeProductInstallPath.isNotEmpty())
|
|
|
|
String installPath = getInstallPathForConfiguration (config);
|
|
|
|
|
|
|
|
if (installPath.isNotEmpty())
|
|
|
|
{
|
|
|
|
s.add ("INSTALL_PATH = \"" + xcodeProductInstallPath + "\"");
|
|
|
|
s.add ("INSTALL_PATH = \"" + installPath + "\"");
|
|
|
|
|
|
|
|
if (xcodeCopyToProductInstallPathAfterBuild)
|
|
|
|
{
|
|
|
@@ -928,19 +931,21 @@ public: |
|
|
|
if (xcodeOtherRezFlags.isNotEmpty())
|
|
|
|
s.add ("OTHER_REZFLAGS = \"" + xcodeOtherRezFlags + "\"");
|
|
|
|
|
|
|
|
String configurationBuildDir = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
|
|
|
|
|
|
|
|
if (config.getTargetBinaryRelativePathString().isNotEmpty())
|
|
|
|
{
|
|
|
|
RelativePath binaryPath (config.getTargetBinaryRelativePathString(), RelativePath::projectFolder);
|
|
|
|
binaryPath = binaryPath.rebased (owner.projectFolder, owner.getTargetFolder(), RelativePath::buildTargetFolder);
|
|
|
|
// a target's position can either be defined via installPath + xcodeCopyToProductInstallPathAfterBuild
|
|
|
|
// (= for audio plug-ins) or using a custom binary path (for everything else), but not both (= conflict!)
|
|
|
|
jassert (! xcodeCopyToProductInstallPathAfterBuild);
|
|
|
|
|
|
|
|
s.add ("DSTROOT = " + addQuotesIfContainsSpace (sanitisePath (binaryPath.toUnixStyle())));
|
|
|
|
s.add ("SYMROOT = " + addQuotesIfContainsSpace (sanitisePath (binaryPath.toUnixStyle())));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
s.add ("CONFIGURATION_BUILD_DIR = \"$(PROJECT_DIR)/build/$(CONFIGURATION)\"");
|
|
|
|
RelativePath binaryPath (config.getTargetBinaryRelativePathString(), RelativePath::projectFolder);
|
|
|
|
configurationBuildDir = sanitisePath (binaryPath.rebased (owner.projectFolder, owner.getTargetFolder(), RelativePath::buildTargetFolder)
|
|
|
|
.toUnixStyle());
|
|
|
|
}
|
|
|
|
|
|
|
|
s.add ("CONFIGURATION_BUILD_DIR = " + addQuotesIfRequired (configurationBuildDir));
|
|
|
|
|
|
|
|
String gccVersion ("com.apple.compilers.llvm.clang.1_0");
|
|
|
|
|
|
|
|
if (owner.iOS)
|
|
|
@@ -950,8 +955,8 @@ public: |
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
const String sdk (config.getMacSDKVersion());
|
|
|
|
const String sdkCompat (config.getMacCompatibilityVersion());
|
|
|
|
const String sdk (config.osxSDKVersion.get());
|
|
|
|
const String sdkCompat (config.osxDeploymentTarget.get());
|
|
|
|
|
|
|
|
for (int ver = oldestSDKVersion; ver <= currentSDKVersion; ++ver)
|
|
|
|
{
|
|
|
@@ -973,14 +978,14 @@ public: |
|
|
|
s.add ("CLANG_CXX_LANGUAGE_STANDARD = \"c++0x\"");
|
|
|
|
s.add ("CLANG_LINK_OBJC_RUNTIME = NO");
|
|
|
|
|
|
|
|
if (config.getCodeSignIdentity().isNotEmpty())
|
|
|
|
s.add ("CODE_SIGN_IDENTITY = " + config.getCodeSignIdentity().quoted());
|
|
|
|
if (! config.codeSignIdentity.isUsingDefault())
|
|
|
|
s.add ("CODE_SIGN_IDENTITY = " + config.codeSignIdentity.get().quoted());
|
|
|
|
|
|
|
|
if (config.getCppLanguageStandard().isNotEmpty())
|
|
|
|
s.add ("CLANG_CXX_LANGUAGE_STANDARD = " + config.getCppLanguageStandard().quoted());
|
|
|
|
if (config.cppLanguageStandard.get().isNotEmpty())
|
|
|
|
s.add ("CLANG_CXX_LANGUAGE_STANDARD = " + config.cppLanguageStandard.get().quoted());
|
|
|
|
|
|
|
|
if (config.getCppLibType().isNotEmpty())
|
|
|
|
s.add ("CLANG_CXX_LIBRARY = " + config.getCppLibType().quoted());
|
|
|
|
if (config.cppStandardLibrary.get().isNotEmpty())
|
|
|
|
s.add ("CLANG_CXX_LIBRARY = " + config.cppStandardLibrary.get().quoted());
|
|
|
|
|
|
|
|
s.add ("COMBINE_HIDPI_IMAGES = YES");
|
|
|
|
|
|
|
@@ -1076,11 +1081,27 @@ public: |
|
|
|
|
|
|
|
s.add ("GCC_PREPROCESSOR_DEFINITIONS = " + indentParenthesisedList (defsList));
|
|
|
|
|
|
|
|
s.addTokens (config.getCustomXcodeFlags(), ",", "\"'");
|
|
|
|
s.addTokens (config.customXcodeFlags.get(), ",", "\"'");
|
|
|
|
|
|
|
|
return getCleanedStringArray (s);
|
|
|
|
}
|
|
|
|
|
|
|
|
String getInstallPathForConfiguration (const XcodeBuildConfiguration& config) const
|
|
|
|
{
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case GUIApp: return "$(HOME)/Applications";
|
|
|
|
case ConsoleApp: return "/usr/bin";
|
|
|
|
case VSTPlugIn: return config.vstBinaryLocation.get();
|
|
|
|
case VST3PlugIn: return config.vst3BinaryLocation.get();
|
|
|
|
case AudioUnitPlugIn: return config.auBinaryLocation.get();
|
|
|
|
case RTASPlugIn: return config.rtasBinaryLocation.get();
|
|
|
|
case AAXPlugIn: return config.aaxBinaryLocation.get();
|
|
|
|
case SharedCodeTarget: return owner.isiOS() ? "@executable_path/Frameworks" : "@executable_path/../Frameworks";
|
|
|
|
default: return String();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
void getLinkerFlags (const BuildConfiguration& config, StringArray& flags, StringArray& librarySearchPaths) const
|
|
|
|
{
|
|
|
@@ -1375,9 +1396,9 @@ private: |
|
|
|
return path;
|
|
|
|
}
|
|
|
|
|
|
|
|
static String addQuotesIfContainsSpace (const String& s)
|
|
|
|
static String addQuotesIfRequired (const String& s)
|
|
|
|
{
|
|
|
|
return s.containsChar (' ') ? s.quoted() : s;
|
|
|
|
return s.containsAnyOf (" $") ? s.quoted() : s;
|
|
|
|
}
|
|
|
|
|
|
|
|
File getProjectBundle() const { return getTargetFolder().getChildFile (project.getProjectFilenameRoot()).withFileExtension (".xcodeproj"); }
|
|
|
@@ -1663,9 +1684,6 @@ private: |
|
|
|
{
|
|
|
|
v->setProperty ("productReference", createID (String ("__productFileID") + targetName), nullptr);
|
|
|
|
|
|
|
|
if (target.xcodeProductInstallPath.isNotEmpty())
|
|
|
|
v->setProperty ("productInstallPath", target.xcodeProductInstallPath, nullptr);
|
|
|
|
|
|
|
|
jassert (target.xcodeProductType.isNotEmpty());
|
|
|
|
v->setProperty ("productType", target.xcodeProductType, nullptr);
|
|
|
|
}
|
|
|
@@ -1930,28 +1948,24 @@ private: |
|
|
|
{
|
|
|
|
s.add ("ENABLE_TESTABILITY = YES");
|
|
|
|
|
|
|
|
if (config.getMacArchitecture() == osxArch_Default || config.getMacArchitecture().isEmpty())
|
|
|
|
if (config.osxArchitecture.get() == osxArch_Default || config.osxArchitecture.get().isEmpty())
|
|
|
|
s.add ("ONLY_ACTIVE_ARCH = YES");
|
|
|
|
}
|
|
|
|
|
|
|
|
String codeSignIdentity = config.getCodeSignIdentity().isNotEmpty() ? config.getCodeSignIdentity()
|
|
|
|
: (iOS ? "iPhone Developer" : "Mac Developer");
|
|
|
|
|
|
|
|
if (iOS)
|
|
|
|
{
|
|
|
|
s.add ("\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = " + codeSignIdentity.quoted());
|
|
|
|
|
|
|
|
s.add ("\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = " + config.codeSignIdentity.get().quoted());
|
|
|
|
s.add ("SDKROOT = iphoneos");
|
|
|
|
s.add ("TARGETED_DEVICE_FAMILY = \"1,2\"");
|
|
|
|
|
|
|
|
const String iosVersion (config.getiOSCompatibilityVersion());
|
|
|
|
const String iosVersion (config.iosDeploymentTarget.get());
|
|
|
|
if (iosVersion.isNotEmpty() && iosVersion != osxVersionDefault)
|
|
|
|
s.add ("IPHONEOS_DEPLOYMENT_TARGET = " + iosVersion);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (config.getCodeSignIdentity().isNotEmpty() || getIosDevelopmentTeamIDString().isNotEmpty())
|
|
|
|
s.add ("\"CODE_SIGN_IDENTITY\" = " + codeSignIdentity.quoted());
|
|
|
|
if (! config.codeSignIdentity.isUsingDefault() || getIosDevelopmentTeamIDString().isNotEmpty())
|
|
|
|
s.add ("\"CODE_SIGN_IDENTITY\" = " + config.codeSignIdentity.get().quoted());
|
|
|
|
}
|
|
|
|
|
|
|
|
s.add ("ZERO_LINK = NO");
|
|
|
|