aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-12-13 14:36:23 +0000
committerAlexander Neundorf <neundorf@kde.org>2009-12-13 14:36:23 +0000
commitcc9c86c96af116e35d0c212b82617126a6a38320 (patch)
treef18b5cbc31b6473fde9928070f64fdda432def0a
parent27d6fce08ed2e1fdffedca6d4c3de4230ece329a (diff)
downloadextra-cmake-modules-cc9c86c96af116e35d0c212b82617126a6a38320.tar.gz
extra-cmake-modules-cc9c86c96af116e35d0c212b82617126a6a38320.tar.bz2
-make building KDE with Qt4 installed as OSX frameworks work
Alex CCMAIL: mike@mikearthur.co.uk CCMAIL: kde-buildsystem@kde.org svn path=/trunk/KDE/kdelibs/; revision=1062002
-rw-r--r--modules/FindKDE4Internal.cmake3
-rw-r--r--modules/FindQt4.cmake9
2 files changed, 8 insertions, 4 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index 41204bf4..fc757925 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -979,9 +979,6 @@ if (APPLE)
# 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)
diff --git a/modules/FindQt4.cmake b/modules/FindQt4.cmake
index 2ca486eb..8216a53e 100644
--- a/modules/FindQt4.cmake
+++ b/modules/FindQt4.cmake
@@ -1016,7 +1016,14 @@ IF (QT4_QMAKE_FOUND)
_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)
+
#######################################
#