[CMake] [PATCH] FindQt4.cmake qt4_automoc improvements

clinton at elemtech.com clinton at elemtech.com
Mon May 19 18:13:32 EDT 2008


On Monday 19 May 2008 12:46:04 pm Tanguy Krotoff wrote:
> On Mon, May 19, 2008 at 8:20 PM, Alexander Neundorf
>
> <a.neundorf-work at gmx.net> wrote:
> > If you don't want that you don't have to use UseQt4.cmake and use
> > FindQt4.cmake directly.
> > There you have fine grained control over that.
>
> I want to use UseQt4.cmake since it defines important things:
> - QT_DEBUG/QT_NO_DEBUG
> - add ${QT_QTMAIN_LIBRARY} if under Windows
> - all the -DQT_GUI_LIB, -DQT_CORE_LIB...
> I was not using UseQt4.cmake until I encounter some issues under MinGW
> as QT_DEBUG/QT_NO_DEBUG were not defined.
> Probably QT_DEBUG/QT_NO_DEBUG should be moved to FindQt4.cmake as it
> is important.
>
> The only problem with UseQt4.cmake is the INCLUDE_DIRECTORIES() which
> increases compilation time.

UseQt4.cmake in CVS has been recently patched to reduce the number of include 
directories specified in certain cases.

For example, if QT_USE_QTUITOOLS=1 but QT_USE_XML=0, the QtXml includes and 
defines are no longer added.  If you still want the includes, because you use 
QtXml directly, you can set QT_USE_XML=1.  qmake makes developer that 
explicit too.

Hope that solves your problem.

Clint


More information about the CMake mailing list