summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-03-09 19:50:11 (GMT)
committerBrad King <brad.king@kitware.com>2007-03-09 19:50:11 (GMT)
commit5ed8ea8a0e0c44c88ad175b76d74ceead2a1327a (patch)
tree8ed0d42c21d00e1cdf81093e2e3b3786630d6d39
parent475447870f1f64803b5827c71e549258b5838b7c (diff)
downloadCMake-5ed8ea8a0e0c44c88ad175b76d74ceead2a1327a.zip
CMake-5ed8ea8a0e0c44c88ad175b76d74ceead2a1327a.tar.gz
CMake-5ed8ea8a0e0c44c88ad175b76d74ceead2a1327a.tar.bz2
BUG: Fixed OSX bundles to be built in the directory specified by cmTarget::GetDirectory(). This is an incremental step for bug#2240.
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx25
1 files changed, 9 insertions, 16 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 2b56a5a..06b054a 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -121,27 +121,22 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
#ifdef __APPLE__
if(this->Target->GetPropertyAsBool("MACOSX_BUNDLE"))
{
+ // Compute bundle directory names.
+ std::string macdir = outpath;
+ macdir += targetName;
+ macdir += ".app/Contents/";
+ outpath = macdir;
+ outpath += "MacOS";
+ cmSystemTools::MakeDirectory(outpath.c_str());
+ outpath += "/";
+
// Make bundle directories
- outpath += targetName;
- outpath += ".app/Contents/MacOS/";
std::string f1 =
this->Makefile->GetModulesFile("MacOSXBundleInfo.plist.in");
if ( f1.size() == 0 )
{
cmSystemTools::Error("could not find Mac OSX bundle template file.");
}
- std::string macdir =
- this->Makefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
- if ( macdir.size() == 0 )
- {
- macdir = this->Makefile->GetCurrentOutputDirectory();
- }
- if(macdir.size() && macdir[macdir.size()-1] != '/')
- {
- macdir += "/";
- }
- macdir += targetName;
- macdir += ".app/Contents/";
std::vector<cmSourceFile*>::iterator sourceIt;
for ( sourceIt = this->Target->GetSourceFiles().begin();
@@ -166,8 +161,6 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
// Configure the Info.plist file. Note that it needs the executable name
// to be set.
std::string f2 = macdir + "Info.plist";
- macdir += "MacOS";
- cmSystemTools::MakeDirectory(macdir.c_str());
this->Makefile->AddDefinition("MACOSX_BUNDLE_EXECUTABLE_NAME",
targetName.c_str());
this->Makefile->ConfigureFile(f1.c_str(), f2.c_str(),