On Monday 07 December 2009, Alexander Neundorf wrote:
> On Saturday 05 December 2009, Mike Arthur wrote:
> > On 5 Dec 2009, at 20:37, Alexander Neundorf wrote:
>
> ...
>
> > > Please make one source dir where UseQt4.cmake is used, and run cmake on
> > > that source dir, and send me the resulting build dir (including
> > > CMakeCache.txt and the CMakeFiles/ subdir).
> > >
> > > And for comparison, please do the same without using UseQt4.cmake, run
> > > cmake, and send me the resulting build tree (which will not build
> > > successfully).
> >
> > Please find it attached.
>
> Thanks :-)
> Is this with the FindQt4.cmake from KDE or from cmake ?

I think I'm starting to understand how this works.
How far do you get with the attached patch (against current svn HEAD) ?

The Qt frameworks are problematic, because we also want to use 
#include <QWidget>
instead of always
#include <QtGui/QWidget>
which would be the correct way for using it as a framework.
If we would support only that second case, then the built-in support for 
frameworks in cmake would probably does everything we need.
But as it is we need the special logic in FindQt4.cmake

With the attached patch there should now be a "-F" flag when compiling source 
files.

Alex
Index: FindKDE4Internal.cmake
===================================================================
--- FindKDE4Internal.cmake	(revision 1059940)
+++ FindKDE4Internal.cmake	(working copy)
@@ -979,9 +979,6 @@
   # optimization flags are set below for the various build types
   set (CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -fno-common")
   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common")
-  if (QT_USE_FRAMEWORKS)
-    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -F${QT_LIBRARY_DIR}")
-  endif (QT_USE_FRAMEWORKS)
 endif (APPLE)
 
 
Index: FindQt4.cmake
===================================================================
--- FindQt4.cmake	(revision 1059940)
+++ FindQt4.cmake	(working copy)
@@ -1016,8 +1016,12 @@
     _QT4_ADJUST_LIB_VARS(QAXSERVER)
     _QT4_ADJUST_LIB_VARS(QAXCONTAINER)
   ENDIF(WIN32)
-  
 
+  IF(QT_USE_FRAMEWORKS)
+      SET(QT_QTCORE_INCLUDE_DIR ${QT_QTCORE_INCLUDE_DIR}  ${QT_QTCORE_LIBRARY})
+  ENDIF(QT_USE_FRAMEWORKS)
+
+
   #######################################
   #
   #       Check the executables of Qt 
_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to