summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_nmake.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-10-31 09:26:35 +0100
committerLiang Qi <liang.qi@qt.io>2016-10-31 09:26:35 +0100
commit8e20daae9fee5f3b999daffce0d7156015ee974b (patch)
tree7adcc397fd378cbb97c186ddb78c226b61906583 /qmake/generators/win32/msvc_nmake.cpp
parent5545e5aa6e265469d278e1fb576a737535784422 (diff)
parent694702e09d9b17d91db282784f009178cfb1059b (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/plugins/platforms/minimalegl/qminimaleglintegration.cpp Change-Id: Ia6ab42a6daadbf8abc085c971545904d49ea4b56
Diffstat (limited to 'qmake/generators/win32/msvc_nmake.cpp')
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 00d5d248ed..6aa850bf4e 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -406,14 +406,21 @@ void NmakeMakefileGenerator::init()
project->values("QMAKE_DISTCLEAN").append(tgt + ".lib");
}
if (project->isActiveConfig("debug_info")) {
- // Add the compiler's PDB file.
- QString pdbfile = var("OBJECTS_DIR") + project->first("TARGET") + ".vc.pdb";
+ QString pdbfile;
+ QString distPdbFile = tgt + ".pdb";
+ if (project->isActiveConfig("staticlib")) {
+ // For static libraries, the compiler's pdb file and the dist pdb file are the same.
+ pdbfile = distPdbFile;
+ } else {
+ // Use $${TARGET}.vc.pdb in the OBJECTS_DIR for the compiler and
+ // $${TARGET}.pdb (the default) for the linker.
+ pdbfile = var("OBJECTS_DIR") + project->first("TARGET") + ".vc.pdb";
+ }
QString escapedPdbFile = escapeFilePath(pdbfile);
project->values("QMAKE_CFLAGS").append("/Fd" + escapedPdbFile);
project->values("QMAKE_CXXFLAGS").append("/Fd" + escapedPdbFile);
project->values("QMAKE_CLEAN").append(pdbfile);
- // Add the linker's PDB file to the distclean target.
- project->values("QMAKE_DISTCLEAN").append(tgt + ".pdb");
+ project->values("QMAKE_DISTCLEAN").append(distPdbFile);
}
if (project->isActiveConfig("debug")) {
project->values("QMAKE_CLEAN").append(tgt + ".ilk");