summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2013-05-06 02:19:05 (GMT)
committerBrad King <brad.king@kitware.com>2013-05-23 14:42:49 (GMT)
commit373faae5e1c936351b143b0561c61ef9884303e1 (patch)
treed5559e6ed2dea2570492c1004c493bfcba76cb1e /Source/cmNinjaNormalTargetGenerator.cxx
parent78185f598c152b1dbce632e953874ce8132c5fe9 (diff)
downloadCMake-373faae5e1c936351b143b0561c61ef9884303e1.zip
CMake-373faae5e1c936351b143b0561c61ef9884303e1.tar.gz
CMake-373faae5e1c936351b143b0561c61ef9884303e1.tar.bz2
Refactor how bundles and frameworks are supported.
Make handling of directory separators consistent between non-bundle and bundle code. Remove xcode specific flag from cmTarget when getting install_name. Add (more) consistent convenience functions in cmTarget to get directories inside of bundles and frameworks to add files to. This refactor also fixes bug #12263 where frameworks had the wrong install name when SKIP_BUILD_RPATH. Also make install_name for frameworks consistent between Makefile and Xcode generator.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx19
1 files changed, 13 insertions, 6 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 7e48cd7..e5a6eab 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -61,7 +61,6 @@ cmNinjaNormalTargetGenerator(cmTarget* target)
}
this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
- this->TargetNameOut,
this->GetConfigName());
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
}
@@ -383,24 +382,32 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
if (this->GetTarget()->IsAppBundleOnApple())
{
// Create the app bundle
- std::string outpath;
+ std::string outpath =
+ this->GetTarget()->GetDirectory(this->GetConfigName());
this->OSXBundleGenerator->CreateAppBundle(this->TargetNameOut, outpath);
// Calculate the output path
- targetOutput = outpath + this->TargetNameOut;
+ targetOutput = outpath;
+ targetOutput += "/";
+ targetOutput += this->TargetNameOut;
targetOutput = this->ConvertToNinjaPath(targetOutput.c_str());
- targetOutputReal = outpath + this->TargetNameReal;
+ targetOutputReal = outpath;
+ targetOutputReal += "/";
+ targetOutputReal += this->TargetNameReal;
targetOutputReal = this->ConvertToNinjaPath(targetOutputReal.c_str());
}
else if (this->GetTarget()->IsFrameworkOnApple())
{
// Create the library framework.
- this->OSXBundleGenerator->CreateFramework(this->TargetNameOut);
+ std::string outpath =
+ this->GetTarget()->GetDirectory(this->GetConfigName());
+ this->OSXBundleGenerator->CreateFramework(this->TargetNameOut, outpath);
}
else if(this->GetTarget()->IsCFBundleOnApple())
{
// Create the core foundation bundle.
- std::string outpath;
+ std::string outpath =
+ this->GetTarget()->GetDirectory(this->GetConfigName());
this->OSXBundleGenerator->CreateCFBundle(this->TargetNameOut, outpath);
}