VS: Fix vcxproj elements specifying binary output locations

Fix generation of OutDir, IntDir, TargetName, and TargetExt element
values to encode the values for XML.
This commit is contained in:
Brad King 2014-06-04 15:29:46 -04:00
parent ee329d543c
commit 39af06e7f7
1 changed files with 8 additions and 9 deletions

View File

@ -1263,23 +1263,22 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
this->ConvertToWindowsSlash(outDir); this->ConvertToWindowsSlash(outDir);
this->WritePlatformConfigTag("OutDir", config->c_str(), 3); this->WritePlatformConfigTag("OutDir", config->c_str(), 3);
*this->BuildFileStream << outDir *this->BuildFileStream << cmVS10EscapeXML(outDir)
<< "</OutDir>\n"; << "</OutDir>\n";
this->WritePlatformConfigTag("IntDir", config->c_str(), 3); this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
*this->BuildFileStream << intermediateDir *this->BuildFileStream << cmVS10EscapeXML(intermediateDir)
<< "</IntDir>\n"; << "</IntDir>\n";
std::string name =
cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull);
this->WritePlatformConfigTag("TargetName", config->c_str(), 3); this->WritePlatformConfigTag("TargetName", config->c_str(), 3);
*this->BuildFileStream *this->BuildFileStream << cmVS10EscapeXML(name) << "</TargetName>\n";
<< cmSystemTools::GetFilenameWithoutLastExtension(
targetNameFull.c_str())
<< "</TargetName>\n";
std::string ext =
cmSystemTools::GetFilenameLastExtension(targetNameFull);
this->WritePlatformConfigTag("TargetExt", config->c_str(), 3); this->WritePlatformConfigTag("TargetExt", config->c_str(), 3);
*this->BuildFileStream *this->BuildFileStream << cmVS10EscapeXML(ext) << "</TargetExt>\n";
<< cmSystemTools::GetFilenameLastExtension(targetNameFull.c_str())
<< "</TargetExt>\n";
this->OutputLinkIncremental(*config); this->OutputLinkIncremental(*config);
} }