Newbie: Howto convert qmake project to cmake

Alexander Neundorf neundorf at kde.org
Tue Jul 11 19:22:04 CEST 2006


On Tuesday 11 July 2006 14:37, Aron Boström wrote:
> On 7/11/06, Christian Ehrlicher <Ch.Ehrlicher at gmx.de> wrote:
> > No, it's the old qmake vs. autotools way to include moc files.
> >
> > qmake adds the moc-files to it's sources and compiles them separatly.
> > autotools/ cmake needs them to be included in the sources with
> >
> > #include " mySource.moc"
>
> Yep. That made the qt tutorial work.
> Thanks!
>
> Aron

If you don't want to use automoc, you can also use

qt4_wrap_cpp(conversationSources 
      file1_to_be_moced.h 
      file2_which_needs_moc.h ...
    )


This will do basically the same, but the moc files will be compiled as 
separate files and you don't have to include them in the other source files.
Pro:
-cmake runs faster, since it doesn't have to check all source files for 
include "blah.moc"
Con:
-compilations is slower

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list