summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-02-09 17:59:09 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-02-09 18:01:19 (GMT)
commit98b448ee9e1fc12181667c5f7431163097466daf (patch)
tree0e89c085f790edb07e22b8ddc593d064716d44fd /Source/cmVisualStudio10TargetGenerator.cxx
parent7258b0674cf64292751dcd36d734688031fffa4c (diff)
downloadCMake-98b448ee9e1fc12181667c5f7431163097466daf.zip
CMake-98b448ee9e1fc12181667c5f7431163097466daf.tar.gz
CMake-98b448ee9e1fc12181667c5f7431163097466daf.tar.bz2
VS2010: Fixed GenerateManifest flag (#10704)
Thanks to "McBen <viertelvor12@gmx.net>" for the patch. (Did not preserve original commit author information because we have a push check for first and last name, and do not accept authors with only an alias...)
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 4cb745e..8a27ffd 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -167,6 +167,7 @@ void cmVisualStudio10TargetGenerator::Generate()
// Write the encoding header into the file
char magic[] = {0xEF,0xBB, 0xBF};
this->BuildFileStream->write(magic, 3);
+ this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",0);
this->WriteString("<Project DefaultTargets=\"Build\" "
"ToolsVersion=\"4.0\" "
"xmlns=\"http://schemas.microsoft.com/"
@@ -998,6 +999,15 @@ OutputLinkIncremental(std::string const& configName)
this->WritePlatformConfigTag("LinkIncremental", configName.c_str(), 3);
*this->BuildFileStream << incremental
<< "</LinkIncremental>\n";
+
+ const char* manifest = "true";
+ if(flags.find("MANIFEST:NO") != flags.npos)
+ {
+ manifest = "false";
+ }
+ this->WritePlatformConfigTag("GenerateManifest", configName.c_str(), 3);
+ *this->BuildFileStream << manifest
+ << "</GenerateManifest>\n";
}
//----------------------------------------------------------------------------
@@ -1326,7 +1336,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
linkDirs += "%(AdditionalLibraryDirectories)";
linkOptions.AddFlag("AdditionalLibraryDirectories", linkDirs.c_str());
linkOptions.AddFlag("AdditionalDependencies", libs.c_str());
- linkOptions.AddFlag("Version", "0.0");
+ linkOptions.AddFlag("Version", "");
if(linkOptions.IsDebug() || flags.find("/debug") != flags.npos)
{
linkOptions.AddFlag("GenerateDebugInformation", "true");
@@ -1369,6 +1379,8 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
linkOptions.AddFlag("ModuleDefinitionFile",
this->ModuleDefinitionFile.c_str());
}
+
+ linkOptions.RemoveFlag("GenerateManifest");
linkOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
linkOptions.OutputFlagMap(*this->BuildFileStream, " ");