summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_nmake.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-03-12 11:59:58 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-03-31 12:45:24 +0000
commit9e97d64ccd27adcb2053c90cfbcafaef68e53893 (patch)
tree9d2388876aade28cc9d8e25ac93b6b85e75ca461 /qmake/generators/win32/msvc_nmake.cpp
parent3cdf46059a668f588fe237aa881c300dd76cbf9e (diff)
Fix installation of .pdb files for applications that have VERSION set
For applications that set VERSION the installation targets of pdb files were wrong in qmake's nmake Makefile generator. Replace code that tries to reconstruct that target's versioned extension with TARGET_EXT which already contains the fully resolved target extension. Fixes: QTBUG-74265 Change-Id: I9553a5f70170e077a59c866079ae51647ae80bef Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'qmake/generators/win32/msvc_nmake.cpp')
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 650c0888c7..f295705e2e 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -95,7 +95,9 @@ QString NmakeMakefileGenerator::defaultInstall(const QString &t)
if (project->isActiveConfig("debug_info")) {
if (t == "dlltarget" || project->values(ProKey(t + ".CONFIG")).indexOf("no_dll") == -1) {
- QString pdb_target = project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".pdb";
+ const QFileInfo targetFileInfo = project->first("DESTDIR") + project->first("TARGET")
+ + project->first("TARGET_EXT");
+ const QString pdb_target = targetFileInfo.completeBaseName() + ".pdb";
QString src_targ = (project->isEmpty("DESTDIR") ? QString("$(DESTDIR)") : project->first("DESTDIR")) + pdb_target;
QString dst_targ = filePrefixRoot(root, fileFixify(targetdir + pdb_target, FileFixifyAbsolute));
if(!ret.isEmpty())
@@ -252,15 +254,16 @@ void NmakeMakefileGenerator::init()
project->values("PRECOMPILED_PCH_C") = ProStringList(precompPchC);
}
- ProString tgt = project->first("DESTDIR")
- + project->first("TARGET") + project->first("TARGET_VERSION_EXT");
+ const QFileInfo targetFileInfo = project->first("DESTDIR") + project->first("TARGET")
+ + project->first("TARGET_EXT");
+ const ProString targetBase = targetFileInfo.path() + '/' + targetFileInfo.completeBaseName();
if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("shared")) {
- project->values("QMAKE_CLEAN").append(tgt + ".exp");
- project->values("QMAKE_DISTCLEAN").append(tgt + ".lib");
+ project->values("QMAKE_CLEAN").append(targetBase + ".exp");
+ project->values("QMAKE_DISTCLEAN").append(targetBase + ".lib");
}
if (project->isActiveConfig("debug_info")) {
QString pdbfile;
- QString distPdbFile = tgt + ".pdb";
+ QString distPdbFile = targetBase + ".pdb";
if (project->isActiveConfig("staticlib")) {
// For static libraries, the compiler's pdb file and the dist pdb file are the same.
pdbfile = distPdbFile;
@@ -276,8 +279,8 @@ void NmakeMakefileGenerator::init()
project->values("QMAKE_DISTCLEAN").append(distPdbFile);
}
if (project->isActiveConfig("debug")) {
- project->values("QMAKE_CLEAN").append(tgt + ".ilk");
- project->values("QMAKE_CLEAN").append(tgt + ".idb");
+ project->values("QMAKE_CLEAN").append(targetBase + ".ilk");
+ project->values("QMAKE_CLEAN").append(targetBase + ".idb");
} else {
ProStringList &defines = project->values("DEFINES");
if (!defines.contains("NDEBUG"))