summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-16 22:17:14 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-16 22:17:14 (GMT)
commitb155f3aa1c4bb503557bda801059e0b6a28898cf (patch)
treeab38724144a719aefc05faa830e004f967ade52d /Source/cmMakefileLibraryTargetGenerator.cxx
parent30235517f81ed7ef8ff8e58685e786da472bf0d6 (diff)
downloadCMake-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/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index dc7d37d..d80fc7e 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -531,6 +531,24 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
cleanObjs += ")";
cmLocalGenerator::RuleVariables vars;
vars.TargetPDB = targetOutPathPDB.c_str();
+
+ // Setup the target version.
+ std::string targetVersionMajor;
+ std::string targetVersionMinor;
+ {
+ cmOStringStream majorStream;
+ cmOStringStream minorStream;
+ int major;
+ int minor;
+ this->Target->GetTargetVersion(major, minor);
+ majorStream << major;
+ minorStream << minor;
+ targetVersionMajor = majorStream.str();
+ targetVersionMinor = minorStream.str();
+ }
+ vars.TargetVersionMajor = targetVersionMajor.c_str();
+ vars.TargetVersionMinor = targetVersionMinor.c_str();
+
vars.Language = linkLanguage;
vars.Objects = buildObjs.c_str();
std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();