diff options
author | David Cole <david.cole@kitware.com> | 2011-07-18 19:25:30 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-07-18 20:37:06 (GMT) |
commit | 0c030ef72c30d9c8634d0d815b15d9f238b7b267 (patch) | |
tree | 71cfc05669982beeaff769b42e721a5ff821c7ff /Source/cmGlobalXCodeGenerator.cxx | |
parent | fefaaa09d92b5a2a58f44f433c096db5ec6668ed (diff) | |
download | CMake-0c030ef72c30d9c8634d0d815b15d9f238b7b267.zip CMake-0c030ef72c30d9c8634d0d815b15d9f238b7b267.tar.gz CMake-0c030ef72c30d9c8634d0d815b15d9f238b7b267.tar.bz2 |
Add use of EFFECTIVE_PLATFORM_NAME to generated Xcode projects.
Facilitates building iOS projects, enabling switching back and forth
between simulator and device builds at development time.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 2cbd3ed..76dd770 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1480,7 +1480,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, BuildObjectListOrString ppDefs(this, this->XcodeVersion >= 30); if(this->XcodeVersion > 15) { - this->AppendDefines(ppDefs, "CMAKE_INTDIR=\"$(CONFIGURATION)\""); + this->AppendDefines(ppDefs, + "CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\""); } if(const char* exportMacro = target.GetExportMacro()) { @@ -1597,9 +1598,12 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, { if(this->XcodeVersion >= 21) { - std::string pncdir = target.GetDirectory(configName); - buildSettings->AddAttribute("CONFIGURATION_BUILD_DIR", - this->CreateString(pncdir.c_str())); + if(!target.UsesDefaultOutputDir(configName, false)) + { + std::string pncdir = target.GetDirectory(configName); + buildSettings->AddAttribute("CONFIGURATION_BUILD_DIR", + this->CreateString(pncdir.c_str())); + } } else { @@ -2399,10 +2403,10 @@ void cmGlobalXCodeGenerator { if(this->XcodeVersion > 15) { - // now add the same one but append $(CONFIGURATION) to it: + // now add the same one but append $(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to it: linkDirs += " "; linkDirs += this->XCodeEscapePath( - (*libDir + "/$(CONFIGURATION)").c_str()); + (*libDir + "/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)").c_str()); } linkDirs += " "; linkDirs += this->XCodeEscapePath(libDir->c_str()); @@ -3173,7 +3177,8 @@ cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout, //---------------------------------------------------------------------------- const char* cmGlobalXCodeGenerator::GetCMakeCFGInitDirectory() { - return this->XcodeVersion >= 21? "$(CONFIGURATION)" : "."; + return this->XcodeVersion >= 21 ? + "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" : "."; } //---------------------------------------------------------------------------- |