diff options
author | Brad King <brad.king@kitware.com> | 2006-10-16 22:17:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-10-16 22:17:14 (GMT) |
commit | b155f3aa1c4bb503557bda801059e0b6a28898cf (patch) | |
tree | ab38724144a719aefc05faa830e004f967ade52d /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 30235517f81ed7ef8ff8e58685e786da472bf0d6 (diff) | |
download | CMake-b155f3aa1c4bb503557bda801059e0b6a28898cf.zip CMake-b155f3aa1c4bb503557bda801059e0b6a28898cf.tar.gz CMake-b155f3aa1c4bb503557bda801059e0b6a28898cf.tar.bz2 |
ENH: Adding image version number (major.minor) property to windows binaries. Default is 0.0, but the VERSION target property may change the value. Windows now has first-class support for dll and exe versioning. This addresses bug#1219.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 0fbca35..262d92e 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -801,6 +801,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, temp += targetFullName; fout << "\t\t\t\tOutputFile=\"" << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n"; + this->WriteTargetVersionAttribute(fout, target); for(std::map<cmStdString, cmStdString>::iterator i = flagMap.begin(); i != flagMap.end(); ++i) { @@ -885,6 +886,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, temp += targetFullName; fout << "\t\t\t\tOutputFile=\"" << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n"; + this->WriteTargetVersionAttribute(fout, target); for(std::map<cmStdString, cmStdString>::iterator i = flagMap.begin(); i != flagMap.end(); ++i) { @@ -925,6 +927,17 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, } } +//---------------------------------------------------------------------------- +void +cmLocalVisualStudio7Generator +::WriteTargetVersionAttribute(std::ostream& fout, cmTarget& target) +{ + int major; + int minor; + target.GetTargetVersion(major, minor); + fout << "\t\t\t\tVersion=\"" << major << "." << minor << "\"\n"; +} + void cmLocalVisualStudio7Generator ::OutputModuleDefinitionFile(std::ostream& fout, cmTarget &target) |