changeset 1100:ef9fcd8df707

package qt: fix failure of -debug-and-release configure option By default, Qt is configured with "-release" in mingw-cross-env. But, it was recently brought to my attention that "-debug-and-release" did not work. This patch allows it to work. The "-debug-and-release" configure option means that both release and debug libraries are built.
author Mark Brand <mabrand@mabrand.nl>
date Mon, 30 Aug 2010 01:58:37 +0200
parents be4292f84a3b
children 28abe875c217
files src/qt-1-win32.patch
diffstat 1 files changed, 42 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/qt-1-win32.patch	Tue Aug 17 20:55:16 2010 +0200
+++ b/src/qt-1-win32.patch	Mon Aug 30 01:58:37 2010 +0200
@@ -1107,3 +1107,45 @@
  contains(QT_CONFIG, embedded):CONFIG += embedded
  
  CONFIG(QTDIR_build) {
+
+commit 94675dbcdb6abcc9d3ed4be2bdd188af65970966
+Author: Mark Brand <mabrand@mabrand.nl>
+Date:   Mon Aug 30 01:12:55 2010 +0200
+
+    fix -debug-and-release in configure script for cross target MinGW
+    
+    Fixed two issues in the configure script that prevented
+    -debug-and-release from working correctly:
+    
+    We now allow dual debug and release mode for MinGW.
+    
+    We follow configure.exe in *not* settting PRECOMPILED_DIR. This gives
+    qmake the freedom to put the debug and release precompiled headers in
+    separate directories.
+
+diff --git a/configure b/configure
+index e6b9476..a0cff96 100755
+--- a/configure
++++ b/configure
+@@ -2275,7 +2275,7 @@ fi
+ 
+ # detect build style
+ if [ "$CFG_DEBUG" = "auto" ]; then
+-    if [ "$PLATFORM_MAC" = "yes" ]; then
++    if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
+         CFG_DEBUG_RELEASE=yes
+         CFG_DEBUG=yes
+     elif [ "$CFG_DEV" = "yes" ]; then
+@@ -6536,7 +6536,11 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
+     QT_CONFIG="$QT_CONFIG embedded"
+     rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
+ fi
+-QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
++if [ "$XPLATFORM_MINGW" != "yes" ]; then
++    # Do not set this here for Windows. Let qmake do it so
++    # debug and release precompiled headers are kept separate.
++    QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
++fi
+ QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
+ QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
+ QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"