summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-22 22:47:31 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-26 21:02:13 (GMT)
commitcf69630e510a5c639a93a99b315fcefea9688935 (patch)
treed8f6fbb0bd8fde15afb3a46eb0639031c8febd16
parent3f8aa62bfb339dded326b0bc36016134a3dc845b (diff)
downloadCMake-cf69630e510a5c639a93a99b315fcefea9688935.zip
CMake-cf69630e510a5c639a93a99b315fcefea9688935.tar.gz
CMake-cf69630e510a5c639a93a99b315fcefea9688935.tar.bz2
cmGeneratorTarget: Move GetFrameworkVersion from cmTarget
-rw-r--r--Source/cmGeneratorTarget.cxx23
-rw-r--r--Source/cmGeneratorTarget.h4
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx2
-rw-r--r--Source/cmOSXBundleGenerator.cxx2
-rw-r--r--Source/cmTarget.cxx19
-rw-r--r--Source/cmTarget.h4
6 files changed, 27 insertions, 27 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index b224f09..95d93bc 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1641,7 +1641,7 @@ cmGeneratorTarget::GetFrameworkDirectory(const std::string& config,
if(!rootDir && !this->Makefile->PlatformIsAppleIos())
{
fpath += "/Versions/";
- fpath += this->Target->GetFrameworkVersion();
+ fpath += this->GetFrameworkVersion();
}
return fpath;
}
@@ -3331,7 +3331,7 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name,
if(!this->Makefile->PlatformIsAppleIos())
{
realName += "Versions/";
- realName += this->Target->GetFrameworkVersion();
+ realName += this->GetFrameworkVersion();
realName += "/";
}
realName += base;
@@ -4526,6 +4526,25 @@ void cmGeneratorTarget::GetTargetVersion(bool soversion,
}
//----------------------------------------------------------------------------
+std::string cmGeneratorTarget::GetFrameworkVersion() const
+{
+ assert(this->GetType() != cmState::INTERFACE_LIBRARY);
+
+ if(const char* fversion = this->GetProperty("FRAMEWORK_VERSION"))
+ {
+ return fversion;
+ }
+ else if(const char* tversion = this->GetProperty("VERSION"))
+ {
+ return tversion;
+ }
+ else
+ {
+ return "A";
+ }
+}
+
+//----------------------------------------------------------------------------
void cmGeneratorTarget::ComputeVersionedName(std::string& vName,
std::string const& prefix,
std::string const& base,
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 2b2dc86..cc7d585 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -165,6 +165,10 @@ public:
std::string GetFrameworkDirectory(const std::string& config,
bool rootDir) const;
+ /** Return the framework version string. Undefined if
+ IsFrameworkOnApple returns false. */
+ std::string GetFrameworkVersion() const;
+
/** @return the Mac CFBundle directory without the base */
std::string GetCFBundleDirectory(const std::string& config,
bool contentOnly) const;
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index e6af94f..9a5c367 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2141,7 +2141,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
{
if(gtgt->GetPropertyAsBool("FRAMEWORK"))
{
- std::string fw_version = gtgt->Target->GetFrameworkVersion();
+ std::string fw_version = gtgt->GetFrameworkVersion();
buildSettings->AddAttribute("FRAMEWORK_VERSION",
this->CreateString(fw_version.c_str()));
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index e9dc433..3c4aa00 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -83,7 +83,7 @@ void cmOSXBundleGenerator::CreateFramework(
std::string newoutpath = outpath + "/" +
this->GT->GetFrameworkDirectory(this->ConfigName, false);
- std::string frameworkVersion = this->GT->Target->GetFrameworkVersion();
+ std::string frameworkVersion = this->GT->GetFrameworkVersion();
// Configure the Info.plist file into the Resources directory.
this->MacContentFolders->insert("Resources");
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index e056469..0c0cf8e 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2048,25 +2048,6 @@ void cmTarget::SetPropertyDefault(const std::string& property,
}
}
-//----------------------------------------------------------------------------
-std::string cmTarget::GetFrameworkVersion() const
-{
- assert(this->GetType() != cmState::INTERFACE_LIBRARY);
-
- if(const char* fversion = this->GetProperty("FRAMEWORK_VERSION"))
- {
- return fversion;
- }
- else if(const char* tversion = this->GetProperty("VERSION"))
- {
- return tversion;
- }
- else
- {
- return "A";
- }
-}
-
bool cmTarget::GetMappedConfig(std::string const& desired_config,
const char** loc,
const char** imp,
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 1cae94f..7e7e34a 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -209,10 +209,6 @@ public:
/** Return whether this target is an executable Bundle on Apple. */
bool IsAppBundleOnApple() const;
- /** Return the framework version string. Undefined if
- IsFrameworkOnApple returns false. */
- std::string GetFrameworkVersion() const;
-
/** Get a backtrace from the creation of the target. */
cmListFileBacktrace const& GetBacktrace() const;