|
Boost-Build : |
From: Hassan Mehmet (hassan_mehmet_at_[hidden])
Date: 2007-04-04 10:49:08
Hassan Mehmet <hassan_mehmet <at> hotmail.com> writes:
> 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 : : : ;
>
Hi
Some additional info/new question. After more experimenting I found that the
problem is with .H as an extension.
If I rename A.H to A.hpp and add a dependency on qt then it will generate the
moc file ok. The alias now looks like this
alias my-sources : A.cpp A.hpp : <dependency>/qt3//qt ;
However this is not a solution for me (too many files and too many #include
statements), so the new question is .....
How can I extend qt3 to recognise .H files as valid inputs to moc ?
Cheers
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