diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 88da09bab..aabf18cb6 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -546,6 +546,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() } } + cmNinjaDeps byproducts; + if (!this->TargetNameImport.empty()) { const std::string impLibPath = localGen.ConvertToOutputFormat( @@ -555,7 +557,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() EnsureParentDirectoryExists(impLibPath); if(target.HasImportLibrary()) { - outputs.push_back(targetOutputImplib); + byproducts.push_back(targetOutputImplib); } } @@ -601,7 +603,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() &postBuildCmdLines }; - cmNinjaDeps byproducts; for (unsigned i = 0; i != 3; ++i) { for (std::vector::const_iterator