From ad0f3588a1afeba7425025012266910930be4d01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sun, 7 Jun 2009 10:15:07 +0200
Subject: Use bundled Expat with qmakeish.


diff --git a/.gitignore b/.gitignore
index 7a5c1eb..11bebac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,10 +4,16 @@
 *.gcno
 *.app
 *.o
+*.obj
 *.a
+*.pdb
 *.swp
 *.exe
 *.dll
+*.lib
+*.exp
+*.ilk
+*.res
 *.moc
 *~
 *.manifest
@@ -26,6 +32,8 @@ Swiften/QA/ClientTest/ClientTest
 Swiften/config.h
 Swiften/config.h.in
 UI/Qt/Makefile
+UI/Qt/Makefile.Debug
+UI/Qt/Makefile.Release
 UI/Qt/swift
 UI/Qt/DefaultTheme.qrc
 UI/Qt/*/Makefile
diff --git a/UI/Qt/Swift.pro b/UI/Qt/Swift.pro
index c62e663..16db0d1 100644
--- a/UI/Qt/Swift.pro
+++ b/UI/Qt/Swift.pro
@@ -11,21 +11,20 @@ else {
 win32 {
 	CONFIG += console
 
-# Configuration
+	# Configuration
 	HAVE_EXPAT=yes
-	HAVE_LIBXML=
+	USE_BUNDLED_EXPAT=yes
+	DEFINES += HAVE_EXPAT
+
 	HAVE_OPENSSL=yes
 	DEFINES += HAVE_OPENSSL
-	DEFINES += HAVE_EXPAT
 	INCLUDEPATH += F:/OpenSSL/include
-	INCLUDEPATH += "F:/Expat 2.0.1/Source/lib"
-#LIBS += -L"F:/Expat 2.0.1/Bin"  -lexpat
-	LIBS += "F:/Expat 2.0.1/Bin/libexpat.lib"
 	LIBS += -LF:/OpenSSL/lib/VC -llibeay32MT -lssleay32MT
 
 	include(Swiften.pri)
 	LIBS += -ldnsapi -lws2_32 -lwsock32
-	} else {
+}
+else {
 	DEPENDPATH += . ../.. ../../3rdParty/Boost
 	INCLUDEPATH += . ../.. ../../3rdParty/Boost
 	LIBS += ../../Swiften/Swiften.a -lexpat -lssl -lcrypto
@@ -44,41 +43,43 @@ mac {
 
 DEFINES += BOOST_SIGNALS_NAMESPACE=bsignals BOOST_ALL_NO_LIB
 
-HEADERS += QtChatWindow.h \
-           QtChatWindowFactory.h \
-           QtJoinMUCDialog.h \
-           QtLoginWindow.h \
-           QtLoginWindowFactory.h \
-           QtMainEventLoop.h \
-           QtMainWindow.h \
-           QtMainWindowFactory.h \
-           QtSettingsProvider.h \
-           QtStatusWidget.h \
-           QtSwift.h \
-           QtTreeWidget.h \
-           QtTreeWidgetFactory.h \
-           QtTreeWidgetItem.h \
-					 QtChatView.h \
-					 ChatSnippet.h \
-					 MessageSnippet.h \
-					 SystemMessageSnippet.h
+HEADERS += \
+	QtChatWindow.h \
+	QtChatWindowFactory.h \
+	QtJoinMUCDialog.h \
+	QtLoginWindow.h \
+	QtLoginWindowFactory.h \
+	QtMainEventLoop.h \
+	QtMainWindow.h \
+	QtMainWindowFactory.h \
+	QtSettingsProvider.h \
+	QtStatusWidget.h \
+	QtSwift.h \
+	QtTreeWidget.h \
+	QtTreeWidgetFactory.h \
+	QtTreeWidgetItem.h \
+	QtChatView.h \
+	ChatSnippet.h \
+	MessageSnippet.h \
+	SystemMessageSnippet.h
 
-SOURCES += main.cpp \
-           QtChatWindow.cpp \
-           QtChatWindowFactory.cpp \
-           QtJoinMUCDialog.cpp \
-           QtLoginWindow.cpp \
-           QtLoginWindowFactory.cpp \
-           QtMainWindow.cpp \
-           QtMainWindowFactory.cpp \
-           QtSettingsProvider.cpp \
-           QtStatusWidget.cpp \
-           QtSwift.cpp \
-           QtTreeWidget.cpp \
-					 QtChatView.cpp  \
-					 ChatSnippet.cpp \
-					 MessageSnippet.cpp \
-					 SystemMessageSnippet.cpp
+SOURCES += \
+	main.cpp \
+	QtChatWindow.cpp \
+	QtChatWindowFactory.cpp \
+	QtJoinMUCDialog.cpp \
+	QtLoginWindow.cpp \
+	QtLoginWindowFactory.cpp \
+	QtMainWindow.cpp \
+	QtMainWindowFactory.cpp \
+	QtSettingsProvider.cpp \
+	QtStatusWidget.cpp \
+	QtSwift.cpp \
+	QtTreeWidget.cpp \
+	QtChatView.cpp  \
+	ChatSnippet.cpp \
+	MessageSnippet.cpp \
+	SystemMessageSnippet.cpp
 
 FORMS += QtJoinMUCDialog.ui
 
diff --git a/UI/Qt/qmakeish.py b/UI/Qt/qmakeish.py
index fb85c44..573e828 100755
--- a/UI/Qt/qmakeish.py
+++ b/UI/Qt/qmakeish.py
@@ -58,7 +58,7 @@ for line in makefile :
         conditional = "win32"
       elif conditional == "MACOSX" :
         conditional = "mac"
-      elif match.group(2).startswith("HAVE_") :
+      elif match.group(2).startswith("HAVE_") or match.group(2).startswith("USE_") :
         conditional = "!isEmpty(" + match.group(2) + ")"
       else :
         conditional = "DUMMY"
@@ -80,7 +80,7 @@ for line in makefile :
       continue
     
     match = re.match("(\w+)_SOURCES (\+?)= (.*)", line) 
-    if match and match.group(1) in ["SWIFTEN", "ZLIB", "LIBIDN", "BOOST"] :
+    if match and match.group(1) in ["SWIFTEN", "ZLIB", "LIBIDN", "BOOST", "EXPAT"] :
       inSources = processSourcesLine(match.group(3))
       continue
 
-- 
cgit v0.10.2-6-g49f6