summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-09 21:57:17 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-19 18:27:41 (GMT)
commitb5f5de70c0b754010f151cde75783a2cc62db835 (patch)
treec350c97df9ba3cdbaca221e8001fc4eefab44252 /Source/cmGeneratorTarget.cxx
parent8e20ea6ef2258867bd6554536fa7b914f266df96 (diff)
downloadCMake-b5f5de70c0b754010f151cde75783a2cc62db835.zip
CMake-b5f5de70c0b754010f151cde75783a2cc62db835.tar.gz
CMake-b5f5de70c0b754010f151cde75783a2cc62db835.tar.bz2
cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.
Leave the cmTarget method behind for now to implement cmInstallCommand.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx22
1 files changed, 15 insertions, 7 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index bdf29b2..42b5c63 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1572,7 +1572,7 @@ cmGeneratorTarget::GetAppBundleDirectory(const std::string& config,
//----------------------------------------------------------------------------
bool cmGeneratorTarget::IsBundleOnApple() const
{
- return this->Target->IsFrameworkOnApple()
+ return this->IsFrameworkOnApple()
|| this->Target->IsAppBundleOnApple()
|| this->Target->IsCFBundleOnApple();
}
@@ -1939,7 +1939,7 @@ cmGeneratorTarget::BuildMacContentDirectory(const std::string& base,
{
fpath += this->GetAppBundleDirectory(config, contentOnly);
}
- if(this->Target->IsFrameworkOnApple())
+ if(this->IsFrameworkOnApple())
{
fpath += this->GetFrameworkDirectory(config, contentOnly);
}
@@ -1959,7 +1959,7 @@ cmGeneratorTarget::GetMacContentDirectory(const std::string& config,
std::string fpath = this->GetDirectory(config, implib);
fpath += "/";
bool contentOnly = true;
- if(this->Target->IsFrameworkOnApple())
+ if(this->IsFrameworkOnApple())
{
// additional files with a framework go into the version specific
// directory
@@ -3227,7 +3227,7 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name,
const char* version = this->GetProperty("VERSION");
const char* soversion = this->GetProperty("SOVERSION");
if(!this->HasSOName(config) ||
- this->Target->IsFrameworkOnApple())
+ this->IsFrameworkOnApple())
{
// Versioning is supported only for shared libraries and modules,
// and then only when the platform supports an soname flag.
@@ -3255,7 +3255,7 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name,
// The library name.
name = prefix+base+suffix;
- if(this->Target->IsFrameworkOnApple())
+ if(this->IsFrameworkOnApple())
{
realName = prefix;
if(!this->Makefile->PlatformIsAppleIos())
@@ -3439,7 +3439,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config,
// Mac application bundles and frameworks have no postfix.
if(configPostfix &&
(this->Target->IsAppBundleOnApple()
- || this->Target->IsFrameworkOnApple()))
+ || this->IsFrameworkOnApple()))
{
configPostfix = 0;
}
@@ -3476,7 +3476,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config,
// frameworks have directory prefix but no suffix
std::string fw_prefix;
- if(this->Target->IsFrameworkOnApple())
+ if(this->IsFrameworkOnApple())
{
fw_prefix = this->GetOutputName(config, false);
fw_prefix += ".framework/";
@@ -5947,3 +5947,11 @@ bool cmGeneratorTarget::IsLinkable() const
this->GetType() == cmState::INTERFACE_LIBRARY ||
this->Target->IsExecutableWithExports());
}
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::IsFrameworkOnApple() const
+{
+ return (this->GetType() == cmState::SHARED_LIBRARY &&
+ this->Makefile->IsOn("APPLE") &&
+ this->GetPropertyAsBool("FRAMEWORK"));
+}