Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-01-29 08:39:29


Hi Pedro,

> We're using Qt and, before using BB to compile a 'ui' file, we need to have
> a plugin
> (itself built using BB) in a directory where Qt can find it.

Understood.

> A possible approach would be to pass to the ui compiler the path to the
> directory
> where the plugin is built. The problem is that the plugin depends on a set
> of libraries
> which must be on the path...

I think there's a solution to this. When building a target, the internal
'xdll-path' properties contains paths to all dependent libraries. We can
convert them to -L flags to uic.

Can you try the attached patch? Running modified Boost.Build on

http://zigzag.cs.msu.su:7813/working_copy/v2/example/qt-ui/

I get all the necessary -L options. Since I've no experience with uic plugins,
I can't tell if it works in real life, though.

There are other possible solutions, but let me know what you think about this
one, first.

- Volodya
 --Boundary-00=_R0QGA1TmRhR6gq7 Content-Type: text/x-diff;
charset="iso-8859-1";
name="qt.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="qt.diff"

Index: qt.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/qt.jam,v
retrieving revision 1.6
diff -u -r1.6 qt.jam
--- qt.jam 5 Aug 2003 05:25:33 -0000 1.6
+++ qt.jam 29 Jan 2004 13:35:12 -0000
@@ -10,6 +10,7 @@
import "class" : new ;
import generators ;
import project ;
+import toolset : flags ;

# Convert this module into a project, so that we can declare
# targets here.
@@ -105,16 +106,20 @@
$(.prefix)/bin/moc -f $(>) -o $(<)
}

+space = " " ;
+
+flags qt.uic-h LIBRARY_PATH <xdll-path> ;
actions uic-h
{
- $(.prefix)/bin/uic $(>) -o $(<)
+ $(.prefix)/bin/uic $(>) -o $(<) -L$(space)$(LIBRARY_PATH)
}

+flags qt.uic-cpp LIBRARY_PATH <xdll-path> ;
# The second target is uic-generated header name. It's placed in
# build dir, but we want to include it using only basename.
actions uic-cpp
{
- $(.prefix)/bin/uic $(>[1]) -i $(>[2]:D=) -o $(<)
+ $(.prefix)/bin/uic $(>[1]) -i $(>[2]:D=) -o $(<) -L$(space)$(LIBRARY_PATH)
}

 --Boundary-00=_R0QGA1TmRhR6gq7--


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