From 46bdfe1d7be4218aeb1113ff0c1f257ca7b9f3d9 Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Thu, 8 Nov 2007 10:56:13 -0500 Subject: [PATCH] ENH: Add support for static Qt 4.3 builds. --- Modules/FindQt4.cmake | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 110de2ec4..d8abca3e4 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -1171,6 +1171,13 @@ IF (QT4_QMAKE_FOUND) MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY) ENDIF(QT_QCONFIG MATCHES "xinerama") + ## Xfixes + IF(QT_QCONFIG MATCHES "xfixes") + FIND_LIBRARY(QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${QMAKE_LIBDIR_X11}) + SET(QT_GUI_LIB_DEPENDENCIES ${QT_GUI_LIB_DEPENDENCIES} ${QT_XFIXES_LIBRARY}) + MARK_AS_ADVANCED(QT_XFIXES_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "xfixes") + ## system-freetype IF(QT_QCONFIG MATCHES "system-freetype") FIND_LIBRARY(QT_FREETYPE_LIBRARY NAMES freetype) @@ -1191,14 +1198,31 @@ IF (QT4_QMAKE_FOUND) SET(QT_CORE_LIB_DEPENDENCIES ${QT_CORE_LIB_DEPENDENCIES} ${QT_ZLIB_LIBRARY}) MARK_AS_ADVANCED(QT_ZLIB_LIBRARY) ENDIF(QT_QCONFIG MATCHES "system-zlib") + ## glib IF(QT_QCONFIG MATCHES "glib") # Qt less than Qt 4.2.0 doesn't use glib - # Qt 4.2.0 uses glib-2.0 (wish we could ask Qt that) + # Qt 4.2.0 uses glib-2.0 (wish we could ask Qt that it uses 2.0) FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0) - SET(QT_CORE_LIB_DEPENDENCIES ${QT_CORE_LIB_DEPENDENCIES} ${QT_GLIB_LIBRARY}) + FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0) + SET(QT_CORE_LIB_DEPENDENCIES ${QT_CORE_LIB_DEPENDENCIES} + ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY}) MARK_AS_ADVANCED(QT_GLIB_LIBRARY) + MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY) ENDIF(QT_QCONFIG MATCHES "glib") + + ## clock-monotonic, just see if we need to link with rt + IF(QT_QCONFIG MATCHES "clock-monotonic") + SET(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES}) + SET(CMAKE_REQUIRED_LIBRARIES rt) + CHECK_SYMBOL_EXISTS(_POSIX_TIMERS "unistd.h;time.h" QT_POSIX_TIMERS) + SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE}) + IF(QT_POSIX_TIMERS) + FIND_LIBRARY(QT_RT_LIBRARY NAMES rt) + SET(QT_CORE_LIB_DEPENDENCIES ${QT_CORE_LIB_DEPENDENCIES} ${QT_RT_LIBRARY}) + MARK_AS_ADVANCED(QT_RT_LIBRARY) + ENDIF(QT_POSIX_TIMERS) + ENDIF(QT_QCONFIG MATCHES "clock-monotonic") IF(Q_WS_X11) # X11 libraries Qt absolutely depends on