summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-04 17:19:41 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-05 16:20:43 (GMT)
commit41abdc17df99662a8e99ba895050dbc8c0e34b8e (patch)
treeca27f70ba5884758eb78d64df23d9202c69c7a1f /Source/cmComputeLinkInformation.cxx
parent1aa13f2b58e477095f76d28a8d9bb1b83a9dd1f5 (diff)
downloadCMake-41abdc17df99662a8e99ba895050dbc8c0e34b8e.zip
CMake-41abdc17df99662a8e99ba895050dbc8c0e34b8e.tar.gz
CMake-41abdc17df99662a8e99ba895050dbc8c0e34b8e.tar.bz2
cmGeneratorTarget: Move GetSOName from cmTarget..
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index e63b44f..72db6f8 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -756,15 +756,16 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item,
return;
}
+ cmGeneratorTarget *gtgt = 0;
+
// Get a full path to the dependent shared library.
// Add it to the runtime path computation so that the target being
// linked will be able to find it.
std::string lib;
if(tgt)
{
- cmGeneratorTarget *gtgt = tgt->GetMakefile()
- ->GetGlobalGenerator()
- ->GetGeneratorTarget(tgt);
+ gtgt = tgt->GetMakefile()->GetGlobalGenerator()->GetGeneratorTarget(tgt);
+
lib = gtgt->GetFullPath(this->Config, this->UseImportLibrary);
this->AddLibraryRuntimeInfo(lib, tgt);
}
@@ -790,9 +791,9 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item,
}
if(order)
{
- if(tgt)
+ if(gtgt)
{
- std::string soName = tgt->GetSOName(this->Config);
+ std::string soName = gtgt->GetSOName(this->Config);
const char* soname = soName.empty()? 0 : soName.c_str();
order->AddRuntimeLibrary(lib, soname);
}
@@ -1804,7 +1805,10 @@ cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath,
// Try to get the soname of the library. Only files with this name
// could possibly conflict.
- std::string soName = target->GetSOName(this->Config);
+ cmGeneratorTarget *gtgt = target->GetMakefile()
+ ->GetGlobalGenerator()
+ ->GetGeneratorTarget(target);
+ std::string soName = gtgt->GetSOName(this->Config);
const char* soname = soName.empty()? 0 : soName.c_str();
// Include this library in the runtime path ordering.