ENH: Add support for static Qt 4.3 builds.

This commit is contained in:
Clinton Stimpson 2007-11-08 10:56:13 -05:00
parent 4e752dee91
commit 46bdfe1d7b
1 changed files with 26 additions and 2 deletions

View File

@ -1171,6 +1171,13 @@ IF (QT4_QMAKE_FOUND)
MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY) MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY)
ENDIF(QT_QCONFIG MATCHES "xinerama") 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 ## system-freetype
IF(QT_QCONFIG MATCHES "system-freetype") IF(QT_QCONFIG MATCHES "system-freetype")
FIND_LIBRARY(QT_FREETYPE_LIBRARY NAMES 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}) SET(QT_CORE_LIB_DEPENDENCIES ${QT_CORE_LIB_DEPENDENCIES} ${QT_ZLIB_LIBRARY})
MARK_AS_ADVANCED(QT_ZLIB_LIBRARY) MARK_AS_ADVANCED(QT_ZLIB_LIBRARY)
ENDIF(QT_QCONFIG MATCHES "system-zlib") ENDIF(QT_QCONFIG MATCHES "system-zlib")
## glib ## glib
IF(QT_QCONFIG MATCHES "glib") IF(QT_QCONFIG MATCHES "glib")
# Qt less than Qt 4.2.0 doesn't use 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) 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_GLIB_LIBRARY)
MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY)
ENDIF(QT_QCONFIG MATCHES "glib") 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) IF(Q_WS_X11)
# X11 libraries Qt absolutely depends on # X11 libraries Qt absolutely depends on