FindQt4.cmake

Peter Kümmel syntheticpp at gmx.net
Wed Feb 1 20:57:23 CET 2006


Benjamin Reed wrote:
> Peter Kümmel wrote:
> 
>>> It seems include/Qt intend is only to provide the qt3 way of including things:
>>> #include "qstring.h", all in one directory (qstring.h is also in QtCore).
>>>
>>> We could drop this folder if we add all(?) of the Qt... folders to the include path.
> 
> The correct fix is to include the header as you're supposed to:
> 
>   #include <QtCore/QtGlobal>
> 
> The reason it makes a difference is that on UNIX, this gets turned into:
> 
>   #include </path/to/qtdir/include/QtCore/QtGlobal>
> 
> ...but on Mac OS X, it gets turned into:
> 
>   #include </Library/Frameworks/QtCore.framework/Headers/QtGlobal>
> 
> 
> On OSX, frameworks are a special kind of container for an API that
> includes the headers and libraries.  The preprocessor knows how to find
> things inside these folders.
> 
> The best way to reliably be sure everything works everywhere is to do it
> the recommended way.  :)

I suggest forcing to #include <Qt.../Q...> will break a huge amount of code.

Makes it on OS X really a difference to use #include <QtGlobal> with a additional
search path?

Peter



More information about the Kde-buildsystem mailing list