summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt4.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-09-19 13:35:37 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-09-19 13:35:37 (GMT)
commit93223f7dc0ee55e8ba6b4d83fc259e472f5e571a (patch)
treecfc80727a4c48a1cbcc8579fcb81c9fbcddb2848 /Modules/FindQt4.cmake
parentc5f249bdbdb894d72db8211021ac2b9ff8b02fa7 (diff)
downloadCMake-93223f7dc0ee55e8ba6b4d83fc259e472f5e571a.zip
CMake-93223f7dc0ee55e8ba6b4d83fc259e472f5e571a.tar.gz
CMake-93223f7dc0ee55e8ba6b4d83fc259e472f5e571a.tar.bz2
BUG: if Qt is installed as a framework, add -F to the command line so
Q_WS_MAC can be detected correctly Alex
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r--Modules/FindQt4.cmake13
1 files changed, 10 insertions, 3 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 1816403..3df4a9f 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -417,14 +417,20 @@ IF (QT4_QMAKE_FOUND)
# Find out what window system we're using
#
#############################################
- # Save required includes variable
+ # Save required variable
SET(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
+ SET(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
# Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}")
+ # On Mac OS X when Qt has framework support, also add the framework path
+ IF( QT_USE_FRAMEWORKS )
+ SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ")
+ ENDIF( QT_USE_FRAMEWORKS )
# Check for Window system symbols (note: only one should end up being set)
CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
- CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
+ CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
+ CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
IF (QT_QTCOPY_REQUIRED)
CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
@@ -433,8 +439,9 @@ IF (QT4_QMAKE_FOUND)
ENDIF (NOT QT_IS_QTCOPY)
ENDIF (QT_QTCOPY_REQUIRED)
- # Restore CMAKE_REQUIRED_INCLUDES variable
+ # Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
+ SET(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
#
#############################################