[CMake] How to write CMakeLists.txt for Qt4 when Q_OBJECT in xxx.cpp file

Clinton Stimpson clinton at elemtech.com
Tue Aug 3 16:19:36 EDT 2010


On Tuesday, August 03, 2010 02:07:31 pm Alexander Neundorf wrote:
> On Saturday 31 July 2010, Clinton Stimpson wrote:
> > If you put main.moc in add_executable() then you don't have to use the
> > set_source_files_properties() to manually specify dependencies.
> 
> Yes, but main.moc is already #included in main.cpp so it cannout be added
> to add_executable.
> 

Why not?  add_executable() isn't going to compile a .moc file like it does a 
.cxx file.

Clint


More information about the CMake mailing list