Qt component defines

Christoph Feck christoph at maxiom.de
Wed Aug 26 23:25:52 CEST 2009


When using Qt qmake, you define the actual Qt components using the "Qt += Xml" 
etc. flags. In addition to adjusting include and linking options, this also 
adds an "QT_XML_LIB" define.

The problem is that QtTest headers (from 4.6-stable branch) conditionally 
define GUI related classes based on the QT_GUI_LIB define to avoid linking 
with QtGui on pure QtCore tests.

CMake, however, does not set these defines, and I am wondering if it should, 
or if I should workaround that in the project files that currently fail.

For example, unless I use "add_definitions(-DQT_GUI_LIB)" I get errors about 
missing symbols when compiling skrooge and kdevelop.

Christoph Feck (kdepepo)

More information about the Kde-buildsystem mailing list