diff options
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index acb5921..fcdcdc5 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1364,7 +1364,18 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout, for (size_t ci = 0; ci < configs.size(); ++ci) { acs.Configs.push_back(ci); } - sources.Sources.emplace_back(std::move(acs)); + bool haveCMakeLists = false; + for (cmGeneratorTarget::AllConfigSource& si : sources.Sources) { + if (si.Source == sf) { + haveCMakeLists = true; + // Replace the explicit source reference with our generated one. + si = acs; + break; + } + } + if (!haveCMakeLists) { + sources.Sources.emplace_back(std::move(acs)); + } } } |