[CMake] Building a main.cpp containing a QObject subclass

Laszlo Papp lpapp at kde.org
Mon Oct 31 08:47:07 EDT 2011


I am now attaching the log about the following files:

1) CMakeLists.txt file
2) main.cpp
3) build log
4) moc_main.cxx

Q_MOC_OUTPUT_REVISION is somehow not defined, but not sure why.

Best Regards,
Laszlo Papp

On Mon, Oct 31, 2011 at 1:31 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> On 31.10.11 13:10:28, Laszlo Papp wrote:
>> Thank you for your help Andreas. I have tried your approach. Please
>> see the attached logs. The moc files are now somehow not generated. I
>> might need to use qt4_wrap_cpp after all ?
>
> Sorry, seems like my local experiments led to wrong conclusions here. At
> least CMake 2.8.5-rc2 ships with a Qt4Macros.cmake file in which
> QT4_AUTOMOC can only QObject subclasses in header files (i.e. the
> foo.moc form). Don't know about the cmake-builtin automoc support since
> I don't have 2.8.6 at hand here.
>
> So yes, at least with the macro's you'll have to go with qt4_wrap_cpp or
> write your own automoc macro, which shouldn't be too hard if you look at
> the existing one.
>
> Andreas
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_content_qt4_wrapp_cpp.log
Type: text/x-log
Size: 10104 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111031/17a59e7c/attachment.bin>


More information about the CMake mailing list