Boost logo

Boost-Build :

From: Juergen Hunold (hunold_at_[hidden])
Date: 2005-11-15 10:30:09


Hi !

Since noone seem to know which list is the right one, I'll post to both
again ;-)

Please find a patch and an example from Qt4.1 snapshot attached.

The patch fixes some glitches and one severe bug.
It changes qt4.jam and the Jamroots for the current examples.

Changes to qt4.jam:
- corrects registration of "qt4.moc.cpp" in line 86.
- adds <threading>multi to the usage-requierements because qt4 is
_always_ and can only be built with multithreading enabled. I found
this in
http://doc.trolltech.com/4.1/qt4-network.html#comparison-with-qt-3
I'm searching for a better rationale in the Qt docs...

- changes the declaration order of the libraries and corrects the
dependencies. Yes, Qt3Support is dependent on nearly all the rest :-((
- adds Support for the new QtSvg SVG-Rendering library (Qt 4.1)

- fixes some bad typo (mine actually *blush*) in the moc-rules where the
defines are prefixed with -I instead of -D. Took me nearly an hour to
find this out. Mmh, I should try to get the bjam tests working again...

I've added the original qt4.1 example plus Jamroot as an example.

The patches on the examples:
- remove "using qt4;" and "using qt4 : /usr/share/qt4" hardcoded
configuration information.
- remove now unnecessary <threading>multi requierement.

I hope someone can review and apply this one...

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold ! Institut für Verkehrswesen, Eisenbahnbau
* voice: ++49 511 762-2529 ! und -betrieb, Universität Hannover 
* fax : ++49 511 762-3001 ! Appelstrasse 9a, D-30167 Hannover
* hunold_at_[hidden] ! www.ive.uni-hannover.de
 --Boundary-00=_C8feDwTL9x7kzAW Content-Type: text/x-diff;
charset="us-ascii";
name="qt4-patch.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="qt4-patch.diff"
Index: tools/build/v2/tools/qt4.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/qt4.jam,v
retrieving revision 1.7
diff -u -r1.7 qt4.jam
--- tools/build/v2/tools/qt4.jam	19 Sep 2005 07:48:36 -0000	1.7
+++ tools/build/v2/tools/qt4.jam	15 Nov 2005 15:05:25 -0000
@@ -86,7 +86,7 @@
# The OBJ result type is a fake here too.
generators.register [ new moc-h-generator 
- qt.moc.cpp : MOCCABLE_CPP : OBJ ] ;
+ qt4.moc.cpp : MOCCABLE_CPP : OBJ ] ;
# Generates .cpp file from qrc file
generators.register-standard qt4.rcc : QRC : CPP(qrc_%) ;
@@ -94,7 +94,9 @@
local usage-requirements = 
<include>$(.prefix)/include 
<library-path>$(.prefix)/lib 
- <dll-path>$(.prefix)/lib ;
+ <dll-path>$(.prefix)/lib 
+ <threading>multi ;
+ 
local suffix ;
if [ os.name ] = NT
@@ -139,22 +141,6 @@
: <name>QtNetwork$(suffix_debug)$(suffix_version) <variant>debug
:
: <include>$(.prefix)/include/QtNetwork ;
- lib Qt3Support : QtCore
- : <name>Qt3Support$(suffix_version) <variant>release
- :
- : <include>$(.prefix)/include/Qt3Support ;
- lib Qt3Support : QtCore
- : <name>Qt3Support$(suffix_debug)$(suffix_version) <variant>debug
- :
- : <include>$(.prefix)/include/Qt3Support ;
- lib QtOpenGL : QtCore
- : <name>QtOpenGL$(suffix_version) <variant>release
- :
- : <include>$(.prefix)/include/QtOpenGL ;
- lib QtOpenGL : QtCore
- : <name>QtOpenGL$(suffix_debug)$(suffix_version) <variant>debug
- :
- : <include>$(.prefix)/include/QtOpenGL ;
lib QtSql : QtCore
: <name>QtSql$(suffix_version) <variant>release
:
@@ -171,6 +157,35 @@
: <name>QtXml$(suffix_debug)$(suffix_version) <variant>debug
:
: <include>$(.prefix)/include/QtXml ;
+
+ lib Qt3Support : QtGui QtNetwork QtXml QSql
+ : <name>Qt3Support$(suffix_version) <variant>release
+ :
+ : <include>$(.prefix)/include/Qt3Support ;
+ lib Qt3Support : QtGui QtNetwork QtXml QSql
+ : <name>Qt3Support$(suffix_debug)$(suffix_version) <variant>debug
+ :
+ : <include>$(.prefix)/include/Qt3Support ;
+
+ # OpenGl Support
+ lib QtOpenGL : QtGui
+ : <name>QtOpenGL$(suffix_version) <variant>release
+ :
+ : <include>$(.prefix)/include/QtOpenGL ;
+ lib QtOpenGL : QtGui
+ : <name>QtOpenGL$(suffix_debug)$(suffix_version) <variant>debug
+ :
+ : <include>$(.prefix)/include/QtOpenGL ;
+
+ # SVG-Support (Qt 4.1)
+ lib QtSvg : QtXml QtOpenGL
+ : <name>QtSvg$(suffix_version) <variant>release
+ :
+ : <include>$(.prefix)/include/QtSvg ;
+ lib QtSvg : QtXml QtOpenGL
+ : <name>QtSvg$(suffix_debug)$(suffix_version) <variant>debug
+ :
+ : <include>$(.prefix)/include/QtSvg ;
}
}
@@ -269,14 +284,14 @@
# Qt4-moc has its c++-parser, so pass INCLUDES and DEFINES.
actions moc
{
- $(.prefix)/bin/moc -I$(INCLUDES) -I$(DEFINES) -f $(>) -o $(<)
+ $(.prefix)/bin/moc -I$(INCLUDES) -D$(DEFINES) -f $(>) -o $(<)
}
# When moccing .cpp files, we don't need -f, otherwise generated
# code will include .cpp and we'll get duplicated symbols.
actions moc.cpp
{
- $(.prefix)/bin/moc -I$(INCLUDES) -I$(DEFINES) $(>) -o $(<)
+ $(.prefix)/bin/moc -I$(INCLUDES) -D$(DEFINES) $(>) -o $(<)
}
Index: tools/build/v2/example/qt/qt4/moccable-cpp/Jamroot
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/example/qt/qt4/moccable-cpp/Jamroot,v
retrieving revision 1.1
diff -u -r1.1 Jamroot
--- tools/build/v2/example/qt/qt4/moccable-cpp/Jamroot	13 Sep 2005 11:03:53 -0000	1.1
+++ tools/build/v2/example/qt/qt4/moccable-cpp/Jamroot	15 Nov 2005 15:04:04 -0000
@@ -1,5 +1,4 @@
-using qt4 : /usr/share/qt4 ;
import cast ;
@@ -10,4 +9,4 @@
/qt4//QtGui ;
-#cast _ moccable-cpp : main.cpp ;
\ No newline at end of file
+#cast _ moccable-cpp : main.cpp ;
Index: tools/build/v2/example/qt/qt4/uic/Jamroot
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/example/qt/qt4/uic/Jamroot,v
retrieving revision 1.1
diff -u -r1.1 Jamroot
--- tools/build/v2/example/qt/qt4/uic/Jamroot	13 Sep 2005 11:03:53 -0000	1.1
+++ tools/build/v2/example/qt/qt4/uic/Jamroot	15 Nov 2005 15:04:37 -0000
@@ -3,10 +3,7 @@
# (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
-using qt4 ;
-
project
- : default-build <threading>multi
;
exe hello : main.cpp hello_world_widget.ui : <library>/qt4//QtGui ;
 --Boundary-00=_C8feDwTL9x7kzAW Content-Type: application/x-tbz;
name="svgviewer.tar.bz2"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="svgviewer.tar.bz2"
[Attachment content not displayed.] --Boundary-00=_C8feDwTL9x7kzAW-- 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk