summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_vcproj.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/win32/msvc_vcproj.cpp')
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index a5ee42a449..6a8d8b7e0f 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -111,7 +111,8 @@ const char _slnExtSections[] = "\n\tGlobalSection(ExtensibilityGlobals) = pos
VcprojGenerator::VcprojGenerator()
: Win32MakefileGenerator(),
is64Bit(false),
- projectWriter(0)
+ projectWriter(0),
+ customBuildToolFilterFileSuffix(QStringLiteral(".cbt"))
{
}
@@ -800,10 +801,14 @@ void VcprojGenerator::init()
if (!hasBuiltinCompiler(file)) {
extraCompilerSources[file] += quc.toQString();
} else {
+ // Use a fake file name foo.moc.cbt for the project view.
+ // This prevents VS from complaining about a circular
+ // dependency from foo.moc -> foo.moc.
QString out = Option::fixPathToTargetOS(replaceExtraCompilerVariables(
compiler_out, file, QString(), NoShell), false);
+ out += customBuildToolFilterFileSuffix;
extraCompilerSources[out] += quc.toQString();
- extraCompilerOutputs[out] = QStringList(file); // Can only have one
+ extraCompilerOutputs[out] = file;
}
}
}