mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 12:42:11 +00:00
* new/qt.jam: New file
* new/target.jam:
(basic-target.generate): Call 'feature.run-action'.
[SVN r16915]
56 lines
1.5 KiB
Plaintext
56 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 ;
|
|
|
|
# The target type for sources that should be processed with the
|
|
# moc tool.
|
|
type.register QPP : qpp ;
|
|
|
|
generators.register-standard qt.moc : QPP : CPP(moc_%) ;
|
|
}
|
|
|
|
rule qt.add-properties ( property )
|
|
{
|
|
return <include>$(.prefix)/include <linkflags>-lqt ;
|
|
}
|
|
|
|
# -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 $(<)
|
|
}
|
|
|
|
|