VS: Port loop to cmGeneratorTarget

This commit is contained in:
Stephen Kelly 2015-10-23 18:26:41 +02:00
parent 94fd5a5af8
commit 1eff421ad0
1 changed files with 4 additions and 6 deletions

View File

@ -441,7 +441,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
for(OrderedTargetDependSet::const_iterator tt = for(OrderedTargetDependSet::const_iterator tt =
projectTargets.begin(); tt != projectTargets.end(); ++tt) projectTargets.begin(); tt != projectTargets.end(); ++tt)
{ {
cmTarget const* target = (*tt)->Target; cmGeneratorTarget const* target = *tt;
if(target->GetType() == cmState::INTERFACE_LIBRARY) if(target->GetType() == cmState::INTERFACE_LIBRARY)
{ {
continue; continue;
@ -459,7 +459,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
project.c_str(), project.c_str(),
location.c_str(), location.c_str(),
target->GetProperty("VS_PROJECT_TYPE"), target->GetProperty("VS_PROJECT_TYPE"),
target->GetUtilities()); target->Target->GetUtilities());
written = true; written = true;
} }
else else
@ -468,9 +468,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
target->GetProperty("GENERATOR_FILE_NAME"); target->GetProperty("GENERATOR_FILE_NAME");
if(vcprojName) if(vcprojName)
{ {
cmLocalGenerator* lg = cmLocalGenerator* lg = target->GetLocalGenerator();
root->GetGlobalGenerator()->GetGeneratorTarget(target)
->GetLocalGenerator();
std::string dir = lg->GetCurrentBinaryDirectory(); std::string dir = lg->GetCurrentBinaryDirectory();
dir = root->Convert(dir.c_str(), dir = root->Convert(dir.c_str(),
cmLocalGenerator::START_OUTPUT); cmLocalGenerator::START_OUTPUT);
@ -479,7 +477,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
dir = ""; // msbuild cannot handle ".\" prefix dir = ""; // msbuild cannot handle ".\" prefix
} }
this->WriteProject(fout, vcprojName, dir.c_str(), this->WriteProject(fout, vcprojName, dir.c_str(),
*target); *target->Target);
written = true; written = true;
} }
} }