Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-01-15 06:35:08


Hi Felix,

> I would like to use Boost Build V2 for building QT based applications.

You'd probably be interested to hear that one of the tests for our
"generators" mechanism was mirrowed for QT's UI files handling :-)

> The
> problem with QT is that it extends the C++ programming language by signals
> and slots and a couple of other minor features. To translate this code to
> standard C++, one has to call the so called moc (Meta Object Compiler). From
> the QT 3 documentation:
>
> The moc reads a C++ source file. If it finds one or more class declarations
> that contain the Q_OBJECT macro, it produces another C++ source file which
> contains the meta object code for the classes that contain the Q_OBJECT
> macro. This generated source file is either #included into the class' source
> file or compiled and linked with the class' implementation.

The question is how we can support this... I mean user interface. I suggest that:

1. User explicitly specifies the list of headers that must be processes with
MOC, for example

qt.exe hello : hello.cpp hello.h ;

2. The files are converted into "moc.cpp" and compiled (i.e.) not includeded.

Is this arrangment OK? If so, it would be relatively easy to add this. (<1
hour if I don't run in bugs :-).

I would not like to choose the #include approach because it is more
complicated for us.

>
> In addition in QT based projects one often has to deal with .ui files that are
> created by the QT's Designer (a GUI building tool). These files have to be
> compiled with the so called uic (User Interface Compiler). From the QT 3
> documentation:
>
> The uic reads a user interface definition (.ui) file in XML as generated by
> Qt Designer and creates corresponding C++ header or source files. It can
> also generate an image file to embed raw image data in C++ source code.

This should be workable too. But let's have moc done first, okay?

- Volodya

 


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