OSDN Git Service

Debugger[New CDB]: Attempt at fixing CDB detection for shadow builds.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Tue, 11 Jan 2011 14:33:46 +0000 (15:33 +0100)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>
Tue, 11 Jan 2011 14:36:18 +0000 (15:36 +0100)
No longer do detection and build in one directory using
.pro/_build.pro as this causes problems with shadow builds.
Instead, do the detection in libs.pro.

src/libs/libs.pro
src/libs/qtcreatorcdbext/qtcreatorcdbext.pro
src/libs/qtcreatorcdbext/qtcreatorcdbext_build.pro [deleted file]

index 6008fa4..e441020 100644 (file)
@@ -16,4 +16,8 @@ SUBDIRS   = \
     symbianutils \
     3rdparty
 
-win32:SUBDIRS += qtcreatorcdbext
+# Windows: Compile Qt Creator CDB extension if Debugging tools can be detected.    
+win32 {
+    include(qtcreatorcdbext/cdb_detect.pri)
+    !isEmpty(CDB_PATH):SUBDIRS += qtcreatorcdbext
+}
index 5012a42..4c48ca6 100644 (file)
@@ -1,14 +1,74 @@
-TEMPLATE  = subdirs
-
-# Build the Qt Creator CDB extension depending on whether
-# CDB is actually detected.
-# In order to do detection and building in one folder,
-# use a subdir profile in '.'.
+# Build the Qt Creator CDB extension
+TEMPLATE = lib
 
+include(../../../qtcreator.pri)
 include(cdb_detect.pri)
 
-!isEmpty(CDB_PATH) {
-    SUBDIRS += lib_qtcreator_cdbext
 
-    lib_qtcreator_cdbext.file = qtcreatorcdbext_build.pro
+CONFIG -= precompile_header
+CONFIG += hide_symbols
+
+# Switch to statically linked CRT. Note: There will be only one
+# global state of the CRT, reconsider if other DLLs are required!
+# TODO: No effect, currently?
+QMAKE_CXXFLAGS_RELEASE    -= -MD
+QMAKE_CXXFLAGS_DEBUG      -= -MDd
+QMAKE_CXXFLAGS_RELEASE    += -MT
+QMAKE_CXXFLAGS_DEBUG      += -MTd
+
+BASENAME=qtcreatorcdbext
+
+DEF_FILE=$$PWD/qtcreatorcdbext.def
+
+IDE_BASE_PATH=$$dirname(IDE_APP_PATH)
+
+# Find out 64/32bit and determine target directories accordingly.
+# TODO: This is an ugly hack. Better check compiler (stderr) or something?
+ENV_LIB_PATH=$$(LIBPATH)
+
+
+contains(ENV_LIB_PATH, ^.*amd64.*$) {
+    DESTDIR=$$IDE_BASE_PATH/lib/$${BASENAME}64
+    CDB_PLATFORM=amd64
+} else {
+    DESTDIR=$$IDE_BASE_PATH/lib/$${BASENAME}32
+    CDB_PLATFORM=i386
 }
+
+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
+QT -= core
+
+SOURCES += qtcreatorcdbextension.cpp \
+    extensioncontext.cpp \
+    eventcallback.cpp \
+    symbolgroupnode.cpp \
+    symbolgroup.cpp \
+    common.cpp \
+    stringutils.cpp \
+    gdbmihelpers.cpp \
+    outputcallback.cpp \
+    base64.cpp \
+    symbolgroupvalue.cpp \
+    containers.cpp
+
+HEADERS += extensioncontext.h \
+    common.h \
+    iinterfacepointer.h \
+    eventcallback.h \
+    symbolgroup.h \
+    stringutils.h \
+    gdbmihelpers.h \
+    outputcallback.h \
+    base64.h \
+    symbolgroupvalue.h \
+    containers.h \
+    knowntype.h \
+    symbolgroupnode.h
diff --git a/src/libs/qtcreatorcdbext/qtcreatorcdbext_build.pro b/src/libs/qtcreatorcdbext/qtcreatorcdbext_build.pro
deleted file mode 100644 (file)
index eab2af0..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-# Build the Qt Creator CDB extension
-TEMPLATE = lib
-
-include(../../../qtcreator.pri)
-include(cdb_detect.pri)
-
-CONFIG -= precompile_header
-CONFIG += hide_symbols
-
-# Switch to statically linked CRT. Note: There will be only one
-# global state of the CRT, reconsider if other DLLs are required!
-# TODO: No effect, currently?
-QMAKE_CXXFLAGS_RELEASE    -= -MD
-QMAKE_CXXFLAGS_DEBUG      -= -MDd
-QMAKE_CXXFLAGS_RELEASE    += -MT
-QMAKE_CXXFLAGS_DEBUG      += -MTd
-
-BASENAME=qtcreatorcdbext
-
-DEF_FILE=$$PWD/qtcreatorcdbext.def
-
-IDE_BASE_PATH=$$dirname(IDE_APP_PATH)
-
-# Find out 64/32bit and determine target directories accordingly.
-# TODO: This is an ugly hack. Better check compiler (stderr) or something?
-ENV_LIB_PATH=$$(LIBPATH)
-
-
-contains(ENV_LIB_PATH, ^.*amd64.*$) {
-    DESTDIR=$$IDE_BASE_PATH/lib/$${BASENAME}64
-    CDB_PLATFORM=amd64
-} else {
-    DESTDIR=$$IDE_BASE_PATH/lib/$${BASENAME}32
-    CDB_PLATFORM=i386
-}
-
-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
-QT -= core
-
-SOURCES += qtcreatorcdbextension.cpp \
-    extensioncontext.cpp \
-    eventcallback.cpp \
-    symbolgroupnode.cpp \
-    symbolgroup.cpp \
-    common.cpp \
-    stringutils.cpp \
-    gdbmihelpers.cpp \
-    outputcallback.cpp \
-    base64.cpp \
-    symbolgroupvalue.cpp \
-    containers.cpp
-
-HEADERS += extensioncontext.h \
-    common.h \
-    iinterfacepointer.h \
-    eventcallback.h \
-    symbolgroup.h \
-    stringutils.h \
-    gdbmihelpers.h \
-    outputcallback.h \
-    base64.h \
-    symbolgroupvalue.h \
-    containers.h \
-    knowntype.h \
-    symbolgroupnode.h