Boost logo

Boost-Build :

From: Hassan Mehmet (hassan_mehmet_at_[hidden])
Date: 2007-04-04 09:43:26


Hi

Please can anyone help by providing a simple example of how to get the qt3 moc
command to work from a Jamfile.

Unfortunately the boost.build examples do not seem to help (I have tried
various combinations of "cast" and "/qt3//qt" and nothing seems to work).

I am currently converting GNUmakefiles to Jamfiles and have 100's of header
files that need to be moc'd (also 100's of .ui files in the same libraries)

For example in a library I may have a Qt derived class A

A.H

---
#include <qdialog.h>
class A : public QDialog
{
  Q_OBJECT
... usual class stuff ...
};
and a source file
A.cpp
-----
#include "A.h"
 ... blah de blah ...
What I want to do is: moc A.H -o A_moc.cpp
and then compile A.cpp and A_moc.cpp and put them in a library
What am I missing from the following
In user-config.jam
------------------
using qt3 ;
In Jamfile
----------
import modules ;
local qtdir = [ modules.peek : qtdir QTDIR ] ; 
project : requirements <include>$(qtdir)/include ;
alias my-sources : A.cpp A_moc.cpp ;
lib LibA : my-sources : : : ;
Thanks
Hassan

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