summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-04 17:19:45 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-05 16:20:46 (GMT)
commitf0aa660772565545cbcda9ed8ae946b8d5097416 (patch)
treebb2cebad21b46bd465c4e5aaf16654a40e88576e /Source/cmGeneratorTarget.cxx
parent766839c56da82e12b6986fb5cf7c8d86442615bc (diff)
downloadCMake-f0aa660772565545cbcda9ed8ae946b8d5097416.zip
CMake-f0aa660772565545cbcda9ed8ae946b8d5097416.tar.gz
CMake-f0aa660772565545cbcda9ed8ae946b8d5097416.tar.bz2
cmGeneratorTarget: Move HasSOName from cmTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 31c2df1..2b3ebee 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -657,6 +657,18 @@ void cmGeneratorTarget::GetSourceFiles(std::vector<cmSourceFile*> &files,
}
//----------------------------------------------------------------------------
+bool cmGeneratorTarget::HasSOName(const std::string& config) const
+{
+ // soname is supported only for shared libraries and modules,
+ // and then only when the platform supports an soname flag.
+ return ((this->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->GetType() == cmTarget::MODULE_LIBRARY) &&
+ !this->GetPropertyAsBool("NO_SONAME") &&
+ this->Makefile->GetSONameFlag(
+ this->Target->GetLinkerLanguage(config)));
+}
+
+//----------------------------------------------------------------------------
std::string cmGeneratorTarget::GetSOName(const std::string& config) const
{
if(this->Target->IsImported())
@@ -1407,7 +1419,7 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name,
// Check for library version properties.
const char* version = this->GetProperty("VERSION");
const char* soversion = this->GetProperty("SOVERSION");
- if(!this->Target->HasSOName(config) ||
+ if(!this->HasSOName(config) ||
this->Target->IsFrameworkOnApple())
{
// Versioning is supported only for shared libraries and modules,