summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-29 16:10:19 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-07 06:37:57 (GMT)
commitc38e30f68c7beffdc65af0f3799ae82ce60aaf67 (patch)
treea46d4525a0685b69df5558a98020e695e5209118 /Source/cmGlobalXCodeGenerator.cxx
parent5d3776a7ebb718ae6ed4724e0a8961cda68b6316 (diff)
downloadCMake-c38e30f68c7beffdc65af0f3799ae82ce60aaf67.zip
CMake-c38e30f68c7beffdc65af0f3799ae82ce60aaf67.tar.gz
CMake-c38e30f68c7beffdc65af0f3799ae82ce60aaf67.tar.bz2
cmGeneratorTarget: Add methods for generate-time source addition.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 64fa12a..3d52e3a 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -463,7 +463,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
std::string listfile = mf->GetCurrentSourceDirectory();
listfile += "/";
listfile += "CMakeLists.txt";
- allbuild->AddSource(listfile.c_str());
+ allBuildGt->AddSource(listfile.c_str());
// Add XCODE depend helper
std::string dir = mf->GetCurrentBinaryDirectory();
@@ -553,11 +553,13 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
allbuild->AddUtility(target.GetName());
}
+ cmGeneratorTarget* targetGT = this->GetGeneratorTarget(&target);
+
// Refer to the build configuration file for easy editing.
listfile = lg->GetMakefile()->GetCurrentSourceDirectory();
listfile += "/";
listfile += "CMakeLists.txt";
- target.AddSource(listfile.c_str());
+ targetGT->AddSource(listfile.c_str());
}
}
}
@@ -1401,7 +1403,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget)
if(cmSourceFile* sf = mf->GetOrCreateSource(fname.c_str()))
{
sf->SetProperty("LANGUAGE", llang.c_str());
- cmtarget.AddSource(fname);
+ gtgt->AddSource(fname);
}
}
@@ -3069,17 +3071,18 @@ bool cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
continue;
}
+ cmGeneratorTarget* gtgt = this->GetGeneratorTarget(&cmtarget);
+
// add the soon to be generated Info.plist file as a source for a
// MACOSX_BUNDLE file
if(cmtarget.GetPropertyAsBool("MACOSX_BUNDLE"))
{
std::string plist = this->ComputeInfoPListLocation(cmtarget);
mf->GetOrCreateSource(plist, true);
- cmtarget.AddSource(plist);
+ gtgt->AddSource(plist);
}
std::vector<cmSourceFile*> classes;
- cmGeneratorTarget* gtgt = this->GetGeneratorTarget(&cmtarget);
if (!gtgt->GetConfigCommonSourceFiles(classes))
{
return false;