diff --git a/windows/msvc/genhdr.targets b/windows/msvc/genhdr.targets
index 5792d878ec..cac3e3ddc4 100644
--- a/windows/msvc/genhdr.targets
+++ b/windows/msvc/genhdr.targets
@@ -69,13 +69,14 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) {
@(QstrDependencies->AnyHaveMetadataValue('Changed', 'True'))
+ @(PyQstrSourceFiles->AnyHaveMetadataValue('Changed', 'True'))
+ Condition="'$(RunPreProcConcat)' == 'True' Or '$(ForceQstrRebuild)' == 'True'"/>