Compile fix for the cdb extension.

The naming of the architecture subfolders have changed between the
"Debugging Tools for Windows" versions and the tools shipped with the
Windows 8 SDK.
Old names: amd64 and i386.
New names: x64 and x86.

Change-Id: Id828ba9fbb0c5074d1046ac7a710fedf07c6c984
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
David Schulz
2014-10-27 09:16:45 +01:00
parent bdc8ceeb60
commit d739c9ff73
2 changed files with 30 additions and 3 deletions

View File

@@ -31,12 +31,30 @@ ENV_LIBPATH=$$(LIBPATH)
contains(ENV_CPU, ^AMD64$) {
DIRNAME=$${BASENAME}64
CDB_PLATFORM=amd64
exists($$CDB_PATH/lib/amd64) {
LIBS+= -L$$CDB_PATH/lib/amd64 -ldbgeng
} else {
LIBS+= -L$$CDB_PATH/lib/x64 -ldbgeng
}
} else:isEmpty(ENV_CPU):contains(ENV_LIBPATH, ^.*amd64.*$) {
DIRNAME=$${BASENAME}64
CDB_PLATFORM=amd64
exists($$CDB_PATH/lib/amd64) {
LIBS+= -L$$CDB_PATH/lib/amd64 -ldbgeng
} else {
LIBS+= -L$$CDB_PATH/lib/x64 -ldbgeng
}
} else {
DIRNAME=$${BASENAME}32
CDB_PLATFORM=i386
exists($$CDB_PATH/lib/i386}) {
LIBS+= -L$$CDB_PATH/lib/i386 -ldbgeng
} else {
LIBS+= -L$$CDB_PATH/lib/x86 -ldbgeng
}
}
LIBS+=-luser32
@@ -47,7 +65,6 @@ TARGET = $$BASENAME
message("Compiling Qt Creator CDB extension $$TARGET $$DESTDIR for $$CDB_PLATFORM using $$CDB_PATH")
INCLUDEPATH += $$CDB_PATH/inc
LIBS+= -L$$CDB_PATH/lib/$$CDB_PLATFORM -ldbgeng
CONFIG -= qt
QT -= gui

View File

@@ -30,11 +30,21 @@ QtcLibrary {
}
return undefined;
}
property string cdbPlatform: qbs.architecture.contains("x86_64") ? "x64" : "x86"
property string cdbLibPath: {
var paths = qbs.architecture.contains("x86_64") ? ["x64", "amd64"] : ["x86", "i386"];
var c = paths.length;
for (var i = 0; i < c; ++i) {
var libPath = FileInfo.joinPaths(cdbPath, "lib", paths[i]);
if (File.exists(libPath)) {
return libPath;
}
}
return undefined;
}
cpp.includePaths: [FileInfo.joinPaths(cdbPath, "inc")]
cpp.dynamicLibraries: [
"user32.lib",
FileInfo.joinPaths(cdbPath, "lib", cdbPlatform, "dbgeng.lib")
FileInfo.joinPaths(cdbLibPath, "dbgeng.lib")
]
cpp.linkerFlags: ["/DEF:" + FileInfo.toWindowsSeparators(
FileInfo.joinPaths(product.sourceDirectory,