summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-08-17 20:11:18 (GMT)
committerBrad King <brad.king@kitware.com>2005-08-17 20:11:18 (GMT)
commitd392acb4e65e2ce133acf4a07dba983060f58725 (patch)
tree94e70b90a43f93849beccb3fb45131d5927a971b /Source/cmLocalGenerator.cxx
parent78112eef25772968412c32026b6a98f3817afe8d (diff)
downloadCMake-d392acb4e65e2ce133acf4a07dba983060f58725.zip
CMake-d392acb4e65e2ce133acf4a07dba983060f58725.tar.gz
CMake-d392acb4e65e2ce133acf4a07dba983060f58725.tar.bz2
ENH: Added versioned executable support. This partially addresses bug#2143. Also made OUTPUT_NAME work when installing executables.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 2433414..f0e531d 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -369,6 +369,18 @@ void cmLocalGenerator::GenerateInstallRules()
}
break;
case cmTarget::EXECUTABLE:
+ {
+ std::string properties;
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ const char* exe_version = 0;
+#else
+ const char* exe_version = l->second.GetProperty("VERSION");
+#endif
+ if(exe_version)
+ {
+ properties += " VERSION ";
+ properties += exe_version;
+ }
if(l->second.GetPropertyAsBool("MACOSX_BUNDLE"))
{
fname = exeOutPath;
@@ -385,7 +397,8 @@ void cmLocalGenerator::GenerateInstallRules()
pdest += ".app/Contents";
bdest += ".app/Contents/MacOS";
// first install the actual executable
- this->AddInstallRule(fout, bdest.c_str(), type, files);
+ this->AddInstallRule(fout, bdest.c_str(), type, files,
+ false, properties.c_str());
files = plist.c_str();
// now install the Info.plist file
this->AddInstallRule(fout, pdest.c_str(),
@@ -396,8 +409,10 @@ void cmLocalGenerator::GenerateInstallRules()
fname = exeOutPath;
fname += l->second.GetFullName(m_Makefile);
files = fname.c_str();
- this->AddInstallRule(fout, dest, type, files);
+ this->AddInstallRule(fout, dest, type, files, false,
+ properties.c_str());
}
+ }
break;
case cmTarget::INSTALL_FILES:
{