Boost logo

Boost-Build :

From: Stephan Diederich (stephan.diederich_at_[hidden])
Date: 2006-09-13 10:49:15


2006/9/13, Phillip Seaver <phil_at_[hidden]>:
> Stephan Diederich wrote:
> > Hi there,
> >
> > recently I thought about switching from qmake to bjam for our builds,
> > and I encountered the following problem:
> > Given 2 libraries A and B.
> > B depends on A, and additionally a file in B #include's a generated
> > header from an ui-file in A.
> > Now there are 2 problems. A *must* be build before B (as the generated
> > header doesn't exist otherwise), and additionally the temporary
> > include (where the generated header goes) must be added for library B.
> >
> > Er, did anyone understand me? ;)
> >
> > Here is what I have atm:
> >
> > toplevel project-root.jam (make the targets visible):
> > use-project /qtlibs/A : qtlibs/A ;
> > use-project /qtlibs/B : qtlibs/B ;
> >
> > qtlibs/A Jamfile.v2:
> > lib A
> > : [ glob *.ui ] [ glob *.cpp ] [ glob *.h ]
> > ;
> >
> > qtlibs/B Jamfile.v2:
> > lib B
> > : [ glob *.ui ] [ glob *.cpp ] [ glob *.h ]
> > : <use>/qtlibs/A
> > : <library>/qtlibs/A
> > ;
> >
> > Thanks,
> > Stephan
> > _
>
> I've never used the QT stuff, but it sounds like you just need:
>
> qtlibs/B Jamfile.v2:
> lib B
> : [ glob *.ui ] [ glob *.cpp ] [ glob *.h ] /qtlibs/A
> ;

First, thanks for the answer.
That didn't do it. If I want to build lib B, it tries to build stuff
from B first, then A, then tries to link. But building B fails again
for the 2 reasons. In the first run the generated header isn't there
yet. In the second run, it is there, but the include path isn't right,
as the generated file is stored to qtlibs/A/bin/gcc/debug/form1base.h
:(

> You might have to add <implicit-dependency>file where "file" is the
> generated header from A, but I *think* it should work without that,
> since I assume the header is one of the outputs of lib A.

Er, tried that, but bjam is complaing about not finding the file.

I've assembled a test case for my example and attached it.

Thanks again,
Stephan




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