2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-17 13:42:14 +00:00
Files
build/qt.jam
Vladimir Prus ec1cd8c3c7 More QT fixes, from J?rgen Hunold.
In addition, use "H" type for mocced headers, not QPP.


[SVN r16959]
2003-01-20 10:44:49 +00:00

52 lines
1.5 KiB
Plaintext

# Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its suitability for any purpose.
import modules ;
import feature ;
import errors ;
import type ;
# Initialized the QT support module. The 'prefix' parameter
# tells where QT is installed. When not given, environmental
# variable QTDIR should be set.
rule init ( prefix ? )
{
if ! $(prefix)
{
prefix = [ modules.peek : QTDIR ] ;
if ! $(prefix)
{
errors.error
"QT installation prefix not given and QTDIR variable is empty" ;
}
}
.prefix = $(prefix) ;
# Work around Boost.Jam bug,
# http://zigzag.cs.msu.su:7814/scarab/issues/id/BB1
modules.poke : QTDIR : $(prefix) ;
feature.extend uses : qt ;
feature.action <uses>qt : qt.add-properties ;
generators.register-standard qt.moc : H : CPP(moc_%) : <uses>qt ;
}
rule qt.add-properties ( property )
{
return <include>$(.prefix)/include <linkflags>-Wl,-rpath,$(.prefix)/lib <linkflags>-L$(.prefix)/lib <linkflags>-lqt-mt ;
}
# -f forces moc to include the processed source file.
# Without it, it would think that .qpp is not a header and would not
# include it from the generated file.
actions moc
{
$(QTDIR)/bin/moc -f $(>) -o $(<)
}