diff options
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, |