KDE/kdelibs/cmake/modules

Alexander Neundorf neundorf at kde.org
Sun Dec 13 15:36:24 CET 2009


SVN commit 1062002 by neundorf:

-make building KDE with Qt4 installed as OSX frameworks work

Alex

CCMAIL: mike at mikearthur.co.uk
CCMAIL: kde-buildsystem at kde.org



 M  +0 -3      FindKDE4Internal.cmake  
 M  +8 -1      FindQt4.cmake  


--- trunk/KDE/kdelibs/cmake/modules/FindKDE4Internal.cmake #1062001:1062002
@@ -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)
 
 
--- trunk/KDE/kdelibs/cmake/modules/FindQt4.cmake #1062001:1062002
@@ -1016,8 +1016,15 @@
     _QT4_ADJUST_LIB_VARS(QAXSERVER)
     _QT4_ADJUST_LIB_VARS(QAXCONTAINER)
   ENDIF(WIN32)
-  
 
+  # If Qt is installed as a framework, we need to add QT_QTCORE_LIBRARY here (which
+  # is the framework directory in that case), since this will make the cmake include_directories()
+  # command recognize that we need the framework flag with the respective directory (-F)
+  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 


More information about the Kde-buildsystem mailing list