From 8c7b74ca2aca352443713d170c619a9eed9cb8c5 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 29 Aug 2026 23:29:50 +1000 Subject: [PATCH] MSBuild: Fix Qt MOC dependency tracking Track each MOC input, output, dependency, and command independently instead of invalidating every generated file whenever the project file changes. --- dep/vsprops/QtCompile.props | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/dep/vsprops/QtCompile.props b/dep/vsprops/QtCompile.props index f78e6f0c5..c14a779ee 100644 --- a/dep/vsprops/QtCompile.props +++ b/dep/vsprops/QtCompile.props @@ -100,13 +100,32 @@ - + Condition="'@(QtMoc)'!=''"> + + + %(QtMoc.FullPath);%(QtMoc.AdditionalDependencies) + "$(QtHostBinDir)moc.exe" "%(QtMoc.FullPath)" -o "$(QtToolOutDir)%(QtMoc.RelativeDir)moc_%(QtMoc.Filename).cpp" -f%(QtMoc.Filename)%(QtMoc.Extension) $(MocDefines) $(MocIncludes) + $(QtToolOutDir)%(QtMoc.RelativeDir)moc_%(QtMoc.Filename).cpp + + - + + + + + + + + <_QtMocOutOfDate Remove="@(_QtMocOutOfDate)" /> +