summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
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 /Source/cmGeneratorTarget.cxx
parent3f8aa62bfb339dded326b0bc36016134a3dc845b (diff)
downloadCMake-cf69630e510a5c639a93a99b315fcefea9688935.zip
CMake-cf69630e510a5c639a93a99b315fcefea9688935.tar.gz
CMake-cf69630e510a5c639a93a99b315fcefea9688935.tar.bz2
cmGeneratorTarget: Move GetFrameworkVersion from cmTarget
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx23
1 files changed, 21 insertions, 2 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,