diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 9ff0a4ae58..9d0d46614a 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -2206,13 +2206,14 @@ void cmMakefileTargetGenerator::CreateLinkLibs( bool useResponseFile, std::vector& makefile_depends, std::string const& linkLanguage, ResponseFlagFor responseMode) { - std::string frameworkPath; - std::string linkPath; - cmComputeLinkInformation* pcli = - this->GeneratorTarget->GetLinkInformation(this->GetConfigName()); - this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath); - linkLibs = frameworkPath + linkPath + linkLibs; + if (cmComputeLinkInformation* pcli = + this->GeneratorTarget->GetLinkInformation(this->GetConfigName())) { + std::string frameworkPath; + std::string linkPath; + this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, + frameworkPath, linkPath); + linkLibs = frameworkPath + linkPath + linkLibs; + } if (useResponseFile && linkLibs.find_first_not_of(' ') != std::string::npos) {