cdbext: add option to skip cdb detection

Since a few windows sdk versions are the headers and libs of the
debugger part of the sdk installation. Add an option to sdkip the cdb
detection and fall back to use these headers and libs that are already
configured in INCLUDE and LIBS of the vcvars.bat environment.

Change-Id: If1eeecdbae34523ddbcc1a22d8640df7fa46bf6a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2020-09-14 14:59:39 +02:00
committed by Eike Ziller
parent 64a37ec38a
commit 5c76ca32ee
3 changed files with 33 additions and 20 deletions

View File

@@ -67,6 +67,10 @@ win32:SUBDIRS += utils/process_ctrlc_stub.pro
# Windows: Compile Qt Creator CDB extension if Debugging tools can be detected.
win32: isEmpty(QTC_SKIP_CDBEXT) {
CDB_NO_AUTODETECT = $$(CDB_NO_AUTODETECT) #use the debugger header and lib defined in INCLUDE and LIB env var
!isEmpty(CDB_NO_AUTODETECT) {
SUBDIRS += qtcreatorcdbext
} else {
include(qtcreatorcdbext/cdb_detect.pri)
!isEmpty(CDB_PATH): exists($$CDB_PATH) {
SUBDIRS += qtcreatorcdbext
@@ -75,6 +79,7 @@ win32: isEmpty(QTC_SKIP_CDBEXT) {
message("If CDB is installed in a none default path define a CDB_PATH")
message("environment variable pointing to your CDB installation.")
}
}
}
QMAKE_EXTRA_TARGETS += deployqt # dummy

View File

@@ -2,7 +2,8 @@
# in case MS VS compilers are used.
CDB_PATH=""
msvc {
CDB_NO_AUTODETECT = $$(CDB_NO_AUTODETECT) #use the debugger header and lib defined in INCLUDE and LIB env var
isEmpty(CDB_NO_AUTODETECT): msvc {
CDB_PATH="$$(CDB_PATH)"
isEmpty(CDB_PATH):CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows/sdk"
!exists($$CDB_PATH):CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows (x86)/sdk"

View File

@@ -36,39 +36,46 @@ contains(ENV_TARGET_ARCH, .*64$) {
DIRNAME=$${BASENAME}64
CDB_PLATFORM=amd64
!isEmpty(CDB_PATH) {
exists($$CDB_PATH/lib/amd64) {
LIBS+= -L$$CDB_PATH/lib/amd64 -ldbgeng
LIBS+= -L$$CDB_PATH/lib/amd64
} else {
LIBS+= -L$$CDB_PATH/lib/x64 -ldbgeng
LIBS+= -L$$CDB_PATH/lib/x64
}
}
} else:isEmpty(ENV_TARGET_ARCH):contains(ENV_LIBPATH, ^.*amd64.*$) {
DIRNAME=$${BASENAME}64
CDB_PLATFORM=amd64
!isEmpty(CDB_PATH) {
exists($$CDB_PATH/lib/amd64) {
LIBS+= -L$$CDB_PATH/lib/amd64 -ldbgeng
LIBS+= -L$$CDB_PATH/lib/amd64
} else {
LIBS+= -L$$CDB_PATH/lib/x64 -ldbgeng
LIBS+= -L$$CDB_PATH/lib/x64
}
}
} else {
DIRNAME=$${BASENAME}32
CDB_PLATFORM=i386
!isEmpty(CDB_PATH) {
exists($$CDB_PATH/lib/i386}) {
LIBS+= -L$$CDB_PATH/lib/i386 -ldbgeng
LIBS+= -L$$CDB_PATH/lib/i386
} else {
LIBS+= -L$$CDB_PATH/lib/x86 -ldbgeng
LIBS+= -L$$CDB_PATH/lib/x86
}
}
}
LIBS+=-luser32
LIBS+=-ldbgeng -luser32
DESTDIR=$$IDE_BUILD_TREE/lib/$${DIRNAME}
TARGET = $$BASENAME
message("Compiling Qt Creator CDB extension $$TARGET $$DESTDIR for $$CDB_PLATFORM using $$CDB_PATH")
INCLUDEPATH += $$CDB_PATH/inc
!isEmpty(CDB_PATH): INCLUDEPATH += $$CDB_PATH/inc
CONFIG -= qt
QT -= gui