summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-07-14 20:00:40 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-07-14 20:00:40 (GMT)
commit44b54d2b94130e6f0afa072a96a7c266e2faefed (patch)
tree5756ca8db329ee4e64d51e9b7e8b9a395b936cd1 /Source/cmLocalGenerator.cxx
parenta9692f0a18b6304c9e5195591df1bf67eefd14e3 (diff)
downloadCMake-44b54d2b94130e6f0afa072a96a7c266e2faefed.zip
CMake-44b54d2b94130e6f0afa072a96a7c266e2faefed.tar.gz
CMake-44b54d2b94130e6f0afa072a96a7c266e2faefed.tar.bz2
ENH: fix for bug 992, mac bundle install fix
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx33
1 files changed, 29 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index e0fc622..b71e53f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -358,10 +358,35 @@ void cmLocalGenerator::GenerateInstallRules()
}
break;
case cmTarget::EXECUTABLE:
- fname = exeOutPath;
- fname += l->second.GetFullName(m_Makefile);
- files = fname.c_str();
- this->AddInstallRule(fout, dest, type, files);
+ if(l->second.GetPropertyAsBool("MACOSX_BUNDLE"))
+ {
+ fname = exeOutPath;
+ fname += l->second.GetFullName(m_Makefile);
+ std::string plist = fname;
+ plist += ".app/Contents/Info.plist";
+ fname += ".app/Contents/MacOS/";
+ fname += l->second.GetName();
+ files = fname.c_str();
+ std::string bdest = dest;
+ bdest += "/";
+ bdest += l->second.GetName();
+ std::string pdest = bdest;
+ pdest += ".app/Contents";
+ bdest += ".app/Contents/MacOS";
+ // first install the actual executable
+ this->AddInstallRule(fout, bdest.c_str(), type, files);
+ files = plist.c_str();
+ // now install the Info.plist file
+ this->AddInstallRule(fout, pdest.c_str(),
+ cmTarget::INSTALL_FILES, files);
+ }
+ else
+ {
+ fname = exeOutPath;
+ fname += l->second.GetFullName(m_Makefile);
+ files = fname.c_str();
+ this->AddInstallRule(fout, dest, type, files);
+ }
break;
case cmTarget::INSTALL_FILES:
{