diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-22 22:47:31 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-26 21:02:13 (GMT) |
commit | cf69630e510a5c639a93a99b315fcefea9688935 (patch) | |
tree | d8f6fbb0bd8fde15afb3a46eb0639031c8febd16 /Source/cmGeneratorTarget.cxx | |
parent | 3f8aa62bfb339dded326b0bc36016134a3dc845b (diff) | |
download | CMake-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.cxx | 23 |
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, |