summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-04 17:19:48 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-05 16:20:48 (GMT)
commit6da99de3236fbaeebf6a4fc66f7d68f43a59902f (patch)
tree540f3a13526d66c3c95e6c7f0bd3481ea82917fa /Source/cmGeneratorTarget.cxx
parentd6bb319b09d056428468d8894f7d7dd2cb0d963e (diff)
downloadCMake-6da99de3236fbaeebf6a4fc66f7d68f43a59902f.zip
CMake-6da99de3236fbaeebf6a4fc66f7d68f43a59902f.tar.gz
CMake-6da99de3236fbaeebf6a4fc66f7d68f43a59902f.tar.bz2
cmGeneratorTarget: Move GetFrameworkDirectory from cmTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx48
1 files changed, 45 insertions, 3 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 436e5dd..834a2e3 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -904,6 +904,48 @@ cmGeneratorTarget::GetAppBundleDirectory(const std::string& config,
}
//----------------------------------------------------------------------------
+std::string cmGeneratorTarget::GetCFBundleDirectory(const std::string& config,
+ bool contentOnly) const
+{
+ std::string fpath;
+ fpath += this->Target->GetOutputName(config, false);
+ fpath += ".";
+ const char *ext = this->Target->GetProperty("BUNDLE_EXTENSION");
+ if (!ext)
+ {
+ if (this->Target->IsXCTestOnApple())
+ {
+ ext = "xctest";
+ }
+ else
+ {
+ ext = "bundle";
+ }
+ }
+ fpath += ext;
+ fpath += "/Contents";
+ if(!contentOnly)
+ fpath += "/MacOS";
+ return fpath;
+}
+
+//----------------------------------------------------------------------------
+std::string
+cmGeneratorTarget::GetFrameworkDirectory(const std::string& config,
+ bool rootDir) const
+{
+ std::string fpath;
+ fpath += this->Target->GetOutputName(config, false);
+ fpath += ".framework";
+ if(!rootDir)
+ {
+ fpath += "/Versions/";
+ fpath += this->Target->GetFrameworkVersion();
+ }
+ return fpath;
+}
+
+//----------------------------------------------------------------------------
std::string
cmGeneratorTarget::GetFullName(const std::string& config, bool implib) const
{
@@ -1007,11 +1049,11 @@ cmGeneratorTarget::BuildMacContentDirectory(const std::string& base,
}
if(this->Target->IsFrameworkOnApple())
{
- fpath += this->Target->GetFrameworkDirectory(config, contentOnly);
+ fpath += this->GetFrameworkDirectory(config, contentOnly);
}
if(this->Target->IsCFBundleOnApple())
{
- fpath += this->Target->GetCFBundleDirectory(config, contentOnly);
+ fpath += this->GetCFBundleDirectory(config, contentOnly);
}
return fpath;
}
@@ -1982,7 +2024,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config,
if(this->Target->IsCFBundleOnApple())
{
- fw_prefix = this->Target->GetCFBundleDirectory(config, false);
+ fw_prefix = this->GetCFBundleDirectory(config, false);
fw_prefix += "/";
targetPrefix = fw_prefix.c_str();
targetSuffix = 0;