2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 00:32:11 +00:00

Preliminary QT support.

* new/qt.jam: New file

* new/target.jam:
    (basic-target.generate): Call 'feature.run-action'.


[SVN r16915]
This commit is contained in:
Vladimir Prus
2003-01-16 12:50:08 +00:00
parent 3a9afcc24b
commit fc65b94993
4 changed files with 64 additions and 1 deletions

55
qt.jam Normal file
View File

@@ -0,0 +1,55 @@
# 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 $(<)
}

View File

@@ -714,7 +714,7 @@ rule split ( property-set )
}
# Appends a rule to the list of rules assigned to the given feature or property.
# That rules will be in extending property sets by the 'run-actions' rule.
# That rules will be used in extending property sets by the 'run-actions' rule.
# The rule should accept single argument -- a property, and return a set of additional
# properties to be added. Property should be specified in the usual way:
# <feature>value, and feature should be specified as <feature>.

View File

@@ -528,6 +528,12 @@ rule basic-target ( name : project
source-targets += [ virtual-target.from-file $(s) : $(self.project) ] ;
}
}
# TODO: this line might cause target's properties to be
# unqual to project's reference properties. As the
# result, we create per-target bin directory while
# it's not really needed.
xproperties = [ feature.run-actions $(xproperties) ] ;
self.generated.$(property-path) =
[ construct $(source-targets) : $(xproperties) ] ;

View File

@@ -50,6 +50,8 @@ feature find-static-library : : free ;
feature library-path : : free path ;
feature library-file : : free path ;
feature uses : : free ;
feature name : : free ;
feature search : : free path ;