|
@@ -414,11 +414,12 @@ void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root)
|
|
|
this->SetCurrentLocalGenerator(root);
|
|
|
cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentSourceDirectory(),
|
|
|
this->ProjectSourceDirectoryComponents);
|
|
|
- cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentBinaryDirectory(),
|
|
|
- this->ProjectOutputDirectoryComponents);
|
|
|
+ cmSystemTools::SplitPath(
|
|
|
+ this->CurrentLocalGenerator->GetCurrentBinaryDirectory(),
|
|
|
+ this->ProjectOutputDirectoryComponents);
|
|
|
|
|
|
this->CurrentXCodeHackMakefile =
|
|
|
- root->GetMakefile()->GetCurrentBinaryDirectory();
|
|
|
+ root->GetCurrentBinaryDirectory();
|
|
|
this->CurrentXCodeHackMakefile += "/CMakeScripts";
|
|
|
cmSystemTools::MakeDirectory(this->CurrentXCodeHackMakefile.c_str());
|
|
|
this->CurrentXCodeHackMakefile += "/XCODE_DEPEND_HELPER.make";
|
|
@@ -466,7 +467,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
|
|
allBuildGt->AddSource(listfile.c_str());
|
|
|
|
|
|
// Add XCODE depend helper
|
|
|
- std::string dir = mf->GetCurrentBinaryDirectory();
|
|
|
+ std::string dir = root->GetCurrentBinaryDirectory();
|
|
|
cmCustomCommandLine makeHelper;
|
|
|
if(this->XcodeVersion < 50)
|
|
|
{
|
|
@@ -568,7 +569,6 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
|
|
void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
|
|
|
cmLocalGenerator* root, std::vector<cmLocalGenerator*> const& gens)
|
|
|
{
|
|
|
- cmMakefile* mf = root->GetMakefile();
|
|
|
std::vector<std::string> lfiles;
|
|
|
for(std::vector<cmLocalGenerator*>::const_iterator gi = gens.begin();
|
|
|
gi != gens.end(); ++gi)
|
|
@@ -582,7 +582,7 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
|
|
|
std::vector<std::string>::iterator new_end =
|
|
|
std::unique(lfiles.begin(), lfiles.end());
|
|
|
lfiles.erase(new_end, lfiles.end());
|
|
|
- this->CurrentReRunCMakeMakefile = mf->GetCurrentBinaryDirectory();
|
|
|
+ this->CurrentReRunCMakeMakefile = root->GetCurrentBinaryDirectory();
|
|
|
this->CurrentReRunCMakeMakefile += "/CMakeScripts";
|
|
|
cmSystemTools::MakeDirectory(this->CurrentReRunCMakeMakefile.c_str());
|
|
|
this->CurrentReRunCMakeMakefile += "/ReRunCMake.make";
|
|
@@ -1033,7 +1033,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen)
|
|
|
this->CurrentLocalGenerator = gen;
|
|
|
this->CurrentMakefile = gen->GetMakefile();
|
|
|
std::string outdir =
|
|
|
- cmSystemTools::CollapseFullPath(this->CurrentMakefile->
|
|
|
+ cmSystemTools::CollapseFullPath(this->CurrentLocalGenerator->
|
|
|
GetCurrentBinaryDirectory());
|
|
|
cmSystemTools::SplitPath(outdir.c_str(),
|
|
|
this->CurrentOutputDirectoryComponents);
|
|
@@ -1389,7 +1389,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget)
|
|
|
// linker language. This should convince Xcode to choose the proper
|
|
|
// language.
|
|
|
cmMakefile* mf = cmtarget.GetMakefile();
|
|
|
- std::string fname = mf->GetCurrentBinaryDirectory();
|
|
|
+ std::string fname = gtgt->GetLocalGenerator()->GetCurrentBinaryDirectory();
|
|
|
fname += cmake::GetCMakeFilesDirectory();
|
|
|
fname += "/";
|
|
|
fname += cmtarget.GetName();
|
|
@@ -1618,7 +1618,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
|
|
|
const & commands,
|
|
|
const char* name)
|
|
|
{
|
|
|
- std::string dir = this->CurrentMakefile->GetCurrentBinaryDirectory();
|
|
|
+ std::string dir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory();
|
|
|
dir += "/CMakeScripts";
|
|
|
cmSystemTools::MakeDirectory(dir.c_str());
|
|
|
std::string makefile = dir;
|
|
@@ -1639,7 +1639,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
|
|
|
currentConfig->c_str());
|
|
|
}
|
|
|
|
|
|
- std::string cdir = this->CurrentMakefile->GetCurrentBinaryDirectory();
|
|
|
+ std::string cdir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory();
|
|
|
cdir = this->ConvertToRelativeForXCode(cdir.c_str());
|
|
|
std::string makecmd = "make -C ";
|
|
|
makecmd += cdir;
|
|
@@ -1967,7 +1967,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
|
|
}
|
|
|
|
|
|
// Set attributes to specify the proper name for the target.
|
|
|
- std::string pndir = this->CurrentMakefile->GetCurrentBinaryDirectory();
|
|
|
+ std::string pndir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory();
|
|
|
if(target.GetType() == cmTarget::STATIC_LIBRARY ||
|
|
|
target.GetType() == cmTarget::SHARED_LIBRARY ||
|
|
|
target.GetType() == cmTarget::MODULE_LIBRARY ||
|
|
@@ -3484,7 +3484,7 @@ bool cmGlobalXCodeGenerator
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- std::string symroot = root->GetMakefile()->GetCurrentBinaryDirectory();
|
|
|
+ std::string symroot = root->GetCurrentBinaryDirectory();
|
|
|
symroot += "/build";
|
|
|
buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot.c_str()));
|
|
|
|
|
@@ -3727,7 +3727,7 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root,
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
- std::string xcodeDir = root->GetMakefile()->GetCurrentBinaryDirectory();
|
|
|
+ std::string xcodeDir = root->GetCurrentBinaryDirectory();
|
|
|
xcodeDir += "/";
|
|
|
xcodeDir += root->GetProjectName();
|
|
|
xcodeDir += ".xcode";
|