summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-04 17:19:49 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-05 16:20:49 (GMT)
commitee26add4f4062d8b53f22e161027a573dc03399c (patch)
tree8874dc7a8b8524127ea16415392c7b62d1b1d4d1 /Source
parentc8a5f5ae60c911298fc3c0f168ac3652223722a4 (diff)
downloadCMake-ee26add4f4062d8b53f22e161027a573dc03399c.zip
CMake-ee26add4f4062d8b53f22e161027a573dc03399c.tar.gz
CMake-ee26add4f4062d8b53f22e161027a573dc03399c.tar.bz2
cmGeneratorTarget: Move IsBundleOnApple from cmTarget.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx8
-rw-r--r--Source/cmGeneratorTarget.h4
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
-rw-r--r--Source/cmNinjaTargetGenerator.cxx2
-rw-r--r--Source/cmTarget.cxx7
-rw-r--r--Source/cmTarget.h4
6 files changed, 14 insertions, 13 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c314372..c68c2b9 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -910,6 +910,14 @@ cmGeneratorTarget::GetAppBundleDirectory(const std::string& config,
}
//----------------------------------------------------------------------------
+bool cmGeneratorTarget::IsBundleOnApple() const
+{
+ return this->Target->IsFrameworkOnApple()
+ || this->Target->IsAppBundleOnApple()
+ || this->Target->IsCFBundleOnApple();
+}
+
+//----------------------------------------------------------------------------
std::string cmGeneratorTarget::GetCFBundleDirectory(const std::string& config,
bool contentOnly) const
{
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index a1193a6..21e0900 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -119,6 +119,10 @@ public:
std::string GetAppBundleDirectory(const std::string& config,
bool contentOnly) const;
+ /** Return whether this target is an executable Bundle, a framework
+ or CFBundle on Apple. */
+ bool IsBundleOnApple() const;
+
/** Get the full name of the target according to the settings in its
makefile. */
std::string GetFullName(const std::string& config="",
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index d38cf4c..0b3df90 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -313,7 +313,7 @@ cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()
(cmSourceFile const& source, const char* pkgloc)
{
// Skip OS X content when not building a Framework or Bundle.
- if(!this->Generator->GetTarget()->IsBundleOnApple())
+ if(!this->Generator->GetGeneratorTarget()->IsBundleOnApple())
{
return;
}
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 16e1f48..07efa16 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -742,7 +742,7 @@ cmNinjaTargetGenerator::MacOSXContentGeneratorType::operator()(
cmSourceFile const& source, const char* pkgloc)
{
// Skip OS X content when not building a Framework or Bundle.
- if(!this->Generator->GetTarget()->IsBundleOnApple())
+ if(!this->Generator->GetGeneratorTarget()->IsBundleOnApple())
{
return;
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 62aa12a..e887ef3 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -590,13 +590,6 @@ bool cmTarget::IsXCTestOnApple() const
}
//----------------------------------------------------------------------------
-bool cmTarget::IsBundleOnApple() const
-{
- return this->IsFrameworkOnApple() || this->IsAppBundleOnApple() ||
- this->IsCFBundleOnApple();
-}
-
-//----------------------------------------------------------------------------
static bool processSources(cmTarget const* tgt,
const std::vector<cmTargetInternals::TargetPropertyEntry*> &entries,
std::vector<std::string> &srcs,
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 9a4915f..e53afff 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -424,10 +424,6 @@ public:
/** Return whether this target is an executable Bundle on Apple. */
bool IsAppBundleOnApple() const;
- /** Return whether this target is an executable Bundle, a framework
- or CFBundle on Apple. */
- bool IsBundleOnApple() const;
-
/** Return the framework version string. Undefined if
IsFrameworkOnApple returns false. */
std::string GetFrameworkVersion() const;