[CMake] Qt4

Filipe Sousa filipe at ipb.pt
Wed Jul 20 10:12:45 EDT 2005


On Wednesday 20 July 2005 14:48, Alexander Neundorf wrote:
> > Von: Filipe Sousa <filipe at ipb.pt>
>
> ...
>
> > QT_ADD_EXECUTABLE can handle resources, user interfaces (not working
>
> yet)
>
> > and
> > moc.
> > My problem is with .ui files. I want cmake handle .ui files the way
>
> qmake
>
> > does. QMake will only generate the ui_MyDialog.h if one of the source
> > file includes that file.
> >
> > I wrote this macro to make MainWindow.cc depending on ui_MyDialog.h
> > QT_UI_DEPENDS(MyDialog.ui MainWindow.cc). I think QT_ADD_EXECUTABLE
> > should handle everything.
>
> You can have a look at websvn.kde.org -> trunk/KDE/kdevelop/cmake/
>
> There the files KDEMacros.cmake and KDEMagic.cmake contain among others a
> macro KDE_MAGIC_FILE_HANDLING() which does most of this.

But this KDE_ADD_UI_FILES macro works only with Qt3. Unlike Qt3, uic from Qt4 
does not generate the same files as in Qt3 and doesn't need the meta object 
compiler either. Only the header file is generated (imagedialog.ui -> 
ui_imagedialog.h)

Have a look at http://doc.trolltech.com/4.0/designer-using-a-component.html


> Bye
> Alex

-- 
Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20050720/4f526b0f/attachment.pgp


More information about the CMake mailing list