aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2020-09-14 14:59:39 +0200
committerEike Ziller <eike.ziller@qt.io>2020-09-15 06:03:45 +0000
commit5c76ca32ee3303af196cfcc6c9aa0b5f51279513 (patch)
tree1fada638258171526f564201c343b8fab9e0bd32
parent64a37ec38a21b31d946a2184d8af18fe0b4f4ad4 (diff)
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>
-rw-r--r--src/libs/libs.pro15
-rw-r--r--src/libs/qtcreatorcdbext/cdb_detect.pri3
-rw-r--r--src/libs/qtcreatorcdbext/qtcreatorcdbext.pro35
3 files changed, 33 insertions, 20 deletions
diff --git a/src/libs/libs.pro b/src/libs/libs.pro
index 013376911f..b6f7518ae9 100644
--- a/src/libs/libs.pro
+++ b/src/libs/libs.pro
@@ -67,13 +67,18 @@ win32:SUBDIRS += utils/process_ctrlc_stub.pro
# Windows: Compile Qt Creator CDB extension if Debugging tools can be detected.
win32: isEmpty(QTC_SKIP_CDBEXT) {
- include(qtcreatorcdbext/cdb_detect.pri)
- !isEmpty(CDB_PATH): exists($$CDB_PATH) {
+ 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 {
- message("Compiling Qt Creator without a CDB extension.")
- message("If CDB is installed in a none default path define a CDB_PATH")
- message("environment variable pointing to your CDB installation.")
+ include(qtcreatorcdbext/cdb_detect.pri)
+ !isEmpty(CDB_PATH): exists($$CDB_PATH) {
+ SUBDIRS += qtcreatorcdbext
+ } else {
+ message("Compiling Qt Creator without a CDB extension.")
+ message("If CDB is installed in a none default path define a CDB_PATH")
+ message("environment variable pointing to your CDB installation.")
+ }
}
}
diff --git a/src/libs/qtcreatorcdbext/cdb_detect.pri b/src/libs/qtcreatorcdbext/cdb_detect.pri
index ae09e258d4..7f866d1d6c 100644
--- a/src/libs/qtcreatorcdbext/cdb_detect.pri
+++ b/src/libs/qtcreatorcdbext/cdb_detect.pri
@@ -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"
diff --git a/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro b/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro
index 774e889b2a..ff7d16bc47 100644
--- a/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro
+++ b/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro
@@ -36,39 +36,46 @@ contains(ENV_TARGET_ARCH, .*64$) {
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
+ !isEmpty(CDB_PATH) {
+ exists($$CDB_PATH/lib/amd64) {
+ LIBS+= -L$$CDB_PATH/lib/amd64
+ } else {
+ LIBS+= -L$$CDB_PATH/lib/x64
+ }
}
} else:isEmpty(ENV_TARGET_ARCH):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
+
+ !isEmpty(CDB_PATH) {
+ exists($$CDB_PATH/lib/amd64) {
+ LIBS+= -L$$CDB_PATH/lib/amd64
+ } else {
+ LIBS+= -L$$CDB_PATH/lib/x64
+ }
}
} 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
+ !isEmpty(CDB_PATH) {
+ exists($$CDB_PATH/lib/i386}) {
+ LIBS+= -L$$CDB_PATH/lib/i386
+ } else {
+ 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