2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 00:52:16 +00:00

Support using Qt3 and Qt4 at the same time.

[SVN r33627]
This commit is contained in:
Vladimir Prus
2006-04-10 09:40:41 +00:00
parent 0241919bc0
commit c59abb7cdf
2 changed files with 21 additions and 13 deletions

View File

@@ -51,19 +51,19 @@ rule init ( prefix ? )
.initialized = true ;
.prefix = $(prefix) ;
generators.register-standard qt3.moc : H : CPP(moc_%) : <allow>qt ;
generators.register-standard qt3.moc : H : CPP(moc_%) : <allow>qt3 ;
# Note: the OBJ target type here is fake, take a look
# at qt4.jam/uic-h-generator for explanations that
# apply in this case as well.
generators.register [ new moc-h-generator
qt3.moc.cpp : MOCCABLE_CPP : OBJ : <allow>qt ] ;
generators.register [ new moc-h-generator-qt3
qt3.moc.cpp : MOCCABLE_CPP : OBJ : <allow>qt3 ] ;
# The UI type is defined in types/qt.jam,
# and UIC_H is only used in qt.jam, but not in qt4.jam, so
# define it here.
type.register UIC_H : : H ;
generators.register-standard qt3.uic-h : UI : UIC_H : <allow>qt ;
generators.register-standard qt3.uic-h : UI : UIC_H : <allow>qt3 ;
# The following generator is used to convert UI files to CPP
# It creates UIC_H from UI, and constructs CPP from UI/UIC_H
@@ -73,7 +73,7 @@ rule init ( prefix ? )
{
rule __init__ ( )
{
generator.__init__ qt3.uic-cpp : UI UIC_H : CPP : <allow>qt ;
generator.__init__ qt3.uic-cpp : UI UIC_H : CPP : <allow>qt3 ;
}
rule run ( project name ? : properties * : sources + )
@@ -118,14 +118,14 @@ rule init ( prefix ? )
<include>$(.prefix)/include
<dll-path>$(.prefix)/lib
<library-path>$(.prefix)/lib
<allow>qt
<allow>qt3
;
lib qt : : <name>qt-mt <threading>multi : : $(usage-requirements) ;
lib qt : : <name>qt <threading>single : : $(usage-requirements) ;
}
}
class moc-h-generator : generator
class moc-h-generator-qt3 : generator
{
rule __init__ ( * : * )
{

View File

@@ -74,19 +74,20 @@ rule init ( prefix )
.prefix = $(prefix) ;
# Generates cpp files from header files using "moc" tool
generators.register-standard qt4.moc : H : CPP(moc_%) ;
generators.register-standard qt4.moc : H : CPP(moc_%) : <allow>qt4 ;
# The OBJ result type is a fake, 'H' will be really produces.
# See comments on the generator calss, defined below
# the 'init' function.
generators.register [ new uic-h-generator qt4.uic-h : UI : OBJ ] ;
generators.register [ new uic-h-generator qt4.uic-h : UI : OBJ
: <allow>qt4 ] ;
# The OBJ result type is a fake here too.
generators.register [ new moc-h-generator
qt4.moc.inc : MOCCABLE_CPP : OBJ ] ;
qt4.moc.inc : MOCCABLE_CPP : OBJ : <allow>qt4 ] ;
generators.register [ new moc-inc-generator
qt4.moc.inc : MOCCABLE_H : OBJ ] ;
qt4.moc.inc : MOCCABLE_H : OBJ : <allow>qt4 ] ;
# Generates .cpp file from qrc file
generators.register-standard qt4.rcc : QRC : CPP(qrc_%) ;
@@ -98,7 +99,12 @@ rule init ( prefix )
local all-libraries = QtCore QtGui QtNetwork QtXml QtSql QtSvg Qt3Support QtTest QtAssistantClient QtUiTools ;
for local l in $(all-libraries)
{
alias $(l) : $(.prefix)//$(l) ;
alias $(l)
: $(.prefix)//$(l)
:
:
: <allow>qt4
;
explicit $(l) ;
}
}
@@ -109,7 +115,9 @@ rule init ( prefix )
<include>$(.prefix)/include
<library-path>$(.prefix)/lib
<dll-path>$(.prefix)/lib
<threading>multi ;
<threading>multi
<allow>qt4
;
local suffix ;
if [ os.name ] = NT