summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt4.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-12-16 22:16:59 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2009-12-16 22:16:59 (GMT)
commiteb83c197896a44b2c4a5e950ef3d8b977fc35ce4 (patch)
treef47fad3fccab958afad1eff65837e2a1982775d4 /Modules/FindQt4.cmake
parent9add940eb6a23b32da6a86b857d05fed900fea74 (diff)
downloadCMake-eb83c197896a44b2c4a5e950ef3d8b977fc35ce4.zip
CMake-eb83c197896a44b2c4a5e950ef3d8b977fc35ce4.tar.gz
CMake-eb83c197896a44b2c4a5e950ef3d8b977fc35ce4.tar.bz2
-better support for Qt4 as frameworks
before this patch -F<framework> dir had to be added manually in some way when using Qt4 installed as framework and when using FindQt4.cmake directly, i.e. without UseQt4.cmake. With this patch the framework dir is automatically added to QT_INCLUDE_DIR when Qt is installed as a framework. Ok by Clinton, tested already in KDE by Mike Arthur. Alex
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r--Modules/FindQt4.cmake11
1 files changed, 10 insertions, 1 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 5a5a1b0..289698e 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -906,7 +906,16 @@ 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_INCLUDES ${QT_INCLUDES} ${QT_QTCORE_LIBRARY} )
+ SET(QT_INCLUDE_DIR ${QT_INCLUDE_DIR} ${QT_QTCORE_LIBRARY} )
+ ENDIF(QT_USE_FRAMEWORKS)
+
+
#######################################
#