From: Friedemann Kleint Date: Tue, 11 Jan 2011 14:33:46 +0000 (+0100) Subject: Debugger[New CDB]: Attempt at fixing CDB detection for shadow builds. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=547ae5380c5ff00fce66617a03431e006638c605;p=qt-creator-jp%2Fqt-creator-jp.git Debugger[New CDB]: Attempt at fixing CDB detection for shadow builds. 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. --- diff --git a/src/libs/libs.pro b/src/libs/libs.pro index 6008fa4f11..e441020b7f 100644 --- a/src/libs/libs.pro +++ b/src/libs/libs.pro @@ -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 +} diff --git a/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro b/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro index 5012a427d3..4c48ca6224 100644 --- a/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro +++ b/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro @@ -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 index eab2af0e99..0000000000 --- a/src/libs/qtcreatorcdbext/qtcreatorcdbext_build.pro +++ /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