[Kde-bindings] smoke qt empty builds on macosx

Petr Vaněk petr at scribus.info
Fri May 7 17:53:52 UTC 2010


Dne pátek 07 Květen 2010 12:38:46 Arno Rehn napsal(a):
> > main changes are in smoke/qt CMakeList.txt:
> > http://qore.svn.sourceforge.net/viewvc/qore/module-qt4/trunk/smoke/qt/CMa
> > ke Lists.txt?r1=3462&r2=3461&pathrev=3462&diff_format=u
> 
> Looks good.
> 
> > it creates 2 new variables to handle mac inlcude dirs and includes.
> > Then there are some tests if it's using really frameworks etc.
> > 
> > there is new file with includes for mac frameworks:
> > 
> > http://qore.svn.sourceforge.net/viewvc/qore/module-qt4/trunk/smoke/qt/qt_
> > in
> > cludes_macframework.h?diff_format=u&revision=3462&view=markup&pathrev=34
> > 62
> 
> Why do we need a different header file here? From a quick glance it appears
> that nothing's different to qt_includes.h.
> If there's really anything platform-specific, try to put it directly into
> qt_includes.h. The header file has fully-fledged preprocessor support, so
> you can test for Q_OS_MAC or similar.

the problem is in mac's frameworks. I will try to explain it on QtCore case.

They are storing includes in
/Library/Frameworks/QtCore.framework/Headers

so the original qt_includes.h containing

#include <QtCore/QtCore>

fails because it cannot find a file to include. It must be used as

#include <QtCore>

Using Q_OS_MAC is not a solution too because macports version of qt4 is using 
its "unix" location in e.g. /opt/local/share/include/QtCore/QtCore

And there is no definition of QT_USING_FRAMEWORKS or something similar in qt4 
itself. And never will be (qt4 crew asked already).

but maybe the qt_includes.h can be changed to contain <QtCore> only (not 
<QtCore/QtCore> it should work too because we have -I/usr/include/QtCore/ in 
gcc args too (do we?) - but I did not test it - it's just a quick idea. And I 
cannot test it now. Have to wait until Monday.

petr



More information about the Kde-bindings mailing list