summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 6239557..24d9b91 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1656,7 +1656,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
bool relink)
{
const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
- cmComputeLinkInformation* pcli = tgt.GetLinkInformation(config);
+ cmGeneratorTarget* gtgt = this->GlobalGenerator->GetGeneratorTarget(&tgt);
+ cmComputeLinkInformation* pcli = gtgt->GetLinkInformation(config);
if(!pcli)
{
return;
@@ -1677,7 +1678,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
std::string linkFlagsVar = "CMAKE_SHARED_LIBRARY_LINK_";
linkFlagsVar += linkLanguage;
linkFlagsVar += "_FLAGS";
- if( tgt.GetType() == cmTarget::EXECUTABLE )
+ if( gtgt->GetType() == cmTarget::EXECUTABLE )
{
linkLibs = this->Makefile->GetSafeDefinition(linkFlagsVar.c_str());
linkLibs += " ";