diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-07 17:25:29 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-10 09:04:39 (GMT) |
commit | a367416cec8297c5a567825217b933f4539a44e4 (patch) | |
tree | 54d57c0bfd583f97699c7dad5e4d218f16689e20 /Source/cmGlobalXCodeGenerator.cxx | |
parent | bbef3c2da83b7a69d1f99b21dc92d5506d98fb35 (diff) | |
download | CMake-a367416cec8297c5a567825217b933f4539a44e4.zip CMake-a367416cec8297c5a567825217b933f4539a44e4.tar.gz CMake-a367416cec8297c5a567825217b933f4539a44e4.tar.bz2 |
cmLocalGenerator: Add current source directory accessor.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b2d8f4a..04441eb 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -412,8 +412,9 @@ void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root) { this->CurrentProject = root->GetProjectName(); this->SetCurrentLocalGenerator(root); - cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentSourceDirectory(), - this->ProjectSourceDirectoryComponents); + cmSystemTools::SplitPath( + this->CurrentLocalGenerator->GetCurrentSourceDirectory(), + this->ProjectSourceDirectoryComponents); cmSystemTools::SplitPath( this->CurrentLocalGenerator->GetCurrentBinaryDirectory(), this->ProjectOutputDirectoryComponents); @@ -461,7 +462,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, mf->AddGeneratorTarget(allbuild, allBuildGt); // Refer to the main build configuration file for easy editing. - std::string listfile = mf->GetCurrentSourceDirectory(); + std::string listfile = root->GetCurrentSourceDirectory(); listfile += "/"; listfile += "CMakeLists.txt"; allBuildGt->AddSource(listfile.c_str()); @@ -557,7 +558,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, cmGeneratorTarget* targetGT = this->GetGeneratorTarget(&target); // Refer to the build configuration file for easy editing. - listfile = lg->GetMakefile()->GetCurrentSourceDirectory(); + listfile = lg->GetCurrentSourceDirectory(); listfile += "/"; listfile += "CMakeLists.txt"; targetGT->AddSource(listfile.c_str()); @@ -3372,7 +3373,7 @@ bool cmGlobalXCodeGenerator // Point Xcode at the top of the source tree. { std::string pdir = - this->RelativeToBinary(root->GetMakefile()->GetCurrentSourceDirectory()); + this->RelativeToBinary(root->GetCurrentSourceDirectory()); this->RootObject->AddAttribute("projectDirPath", this->CreateString(pdir.c_str())); this->RootObject->AddAttribute("projectRoot", this->CreateString("")); |