summaryrefslogtreecommitdiffstats
path: root/Modules/Qt4ConfigDependentSettings.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2010-03-17 16:46:22 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2010-03-17 16:48:05 (GMT)
commit61ad5242b7bf56ae9e9b6fc704d0228a9fa2d620 (patch)
tree71ca91aabcaced3c3167350ff31d00ca51f6ebaa /Modules/Qt4ConfigDependentSettings.cmake
parent44492fff53e6f9078be3a7dc1b290ee5f8b94c1f (diff)
downloadCMake-61ad5242b7bf56ae9e9b6fc704d0228a9fa2d620.zip
CMake-61ad5242b7bf56ae9e9b6fc704d0228a9fa2d620.tar.gz
CMake-61ad5242b7bf56ae9e9b6fc704d0228a9fa2d620.tar.bz2
Change to use FindX11.cmake. Should fix #9929.
Diffstat (limited to 'Modules/Qt4ConfigDependentSettings.cmake')
-rw-r--r--Modules/Qt4ConfigDependentSettings.cmake78
1 files changed, 25 insertions, 53 deletions
diff --git a/Modules/Qt4ConfigDependentSettings.cmake b/Modules/Qt4ConfigDependentSettings.cmake
index 01f740f..ccbc828 100644
--- a/Modules/Qt4ConfigDependentSettings.cmake
+++ b/Modules/Qt4ConfigDependentSettings.cmake
@@ -81,80 +81,63 @@ ENDIF(QT_QCONFIG MATCHES "system-png")
# for X11, get X11 library directory
IF(Q_WS_X11)
- QT_QUERY_QMAKE(QMAKE_LIBDIR_X11 "QMAKE_LIBDIR_X11")
+ FIND_PACKAGE(X11)
ENDIF(Q_WS_X11)
## X11 SM
IF(QT_QCONFIG MATCHES "x11sm")
- # ask qmake where the x11 libs are
- FIND_LIBRARY(QT_X11_SM_LIBRARY NAMES SM PATHS ${QMAKE_LIBDIR_X11})
- FIND_LIBRARY(QT_X11_ICE_LIBRARY NAMES ICE PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_X11_SM_LIBRARY)
- MARK_AS_ADVANCED(QT_X11_ICE_LIBRARY)
- IF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_X11_SM_LIBRARY} ${QT_X11_ICE_LIBRARY})
- ENDIF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY)
+ IF(X11_SM_LIB AND X11_ICE_LIB)
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_SM_LIB} ${X11_ICE_LIB})
+ ENDIF(X11_SM_LIB AND X11_ICE_LIB)
ENDIF(QT_QCONFIG MATCHES "x11sm")
## Xi
IF(QT_QCONFIG MATCHES "tablet")
- FIND_LIBRARY(QT_XI_LIBRARY NAMES Xi PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XI_LIBRARY)
- IF(QT_XI_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XI_LIBRARY})
- ENDIF(QT_XI_LIBRARY)
+ IF(X11_Xi_LIB)
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xi_LIB})
+ ENDIF(X11_Xi_LIB)
ENDIF(QT_QCONFIG MATCHES "tablet")
## Xrender
IF(QT_QCONFIG MATCHES "xrender")
- FIND_LIBRARY(QT_XRENDER_LIBRARY NAMES Xrender PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XRENDER_LIBRARY)
- IF(QT_XRENDER_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRENDER_LIBRARY})
- ENDIF(QT_XRENDER_LIBRARY)
+ IF(X11_Xrender_LIB)
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xrender_LIB})
+ ENDIF(X11_Xrender_LIB)
ENDIF(QT_QCONFIG MATCHES "xrender")
## Xrandr
IF(QT_QCONFIG MATCHES "xrandr")
- FIND_LIBRARY(QT_XRANDR_LIBRARY NAMES Xrandr PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XRANDR_LIBRARY)
- IF(QT_XRANDR_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRANDR_LIBRARY})
- ENDIF(QT_XRANDR_LIBRARY)
+ IF(X11_Xrandr_LIB)
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xrandr_LIB})
+ ENDIF(X11_Xrandr_LIB)
ENDIF(QT_QCONFIG MATCHES "xrandr")
## Xcursor
IF(QT_QCONFIG MATCHES "xcursor")
- FIND_LIBRARY(QT_XCURSOR_LIBRARY NAMES Xcursor PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XCURSOR_LIBRARY)
- IF(QT_XCURSOR_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XCURSOR_LIBRARY})
- ENDIF(QT_XCURSOR_LIBRARY)
+ IF(X11_Xcursor_LIB)
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xcursor_LIB})
+ ENDIF(X11_Xcursor_LIB)
ENDIF(QT_QCONFIG MATCHES "xcursor")
## Xinerama
IF(QT_QCONFIG MATCHES "xinerama")
- FIND_LIBRARY(QT_XINERAMA_LIBRARY NAMES Xinerama PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY)
- IF(QT_XINERAMA_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XINERAMA_LIBRARY})
- ENDIF(QT_XINERAMA_LIBRARY)
+ IF(X11_Xinerama_LIB)
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xinerama_LIB})
+ ENDIF(X11_Xinerama_LIB)
ENDIF(QT_QCONFIG MATCHES "xinerama")
## Xfixes
IF(QT_QCONFIG MATCHES "xfixes")
- FIND_LIBRARY(QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XFIXES_LIBRARY)
- IF(QT_XFIXES_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XFIXES_LIBRARY})
- ENDIF(QT_XFIXES_LIBRARY)
+ IF(X11_Xfixes_LIB)
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xfixes_LIB})
+ ENDIF(X11_Xfixes_LIB)
ENDIF(QT_QCONFIG MATCHES "xfixes")
@@ -315,24 +298,13 @@ ENDIF(QT_QCONFIG MATCHES "clock-monotonic")
IF(Q_WS_X11)
- # X11 libraries Qt absolutely depends on
- QT_QUERY_QMAKE(QT_LIBS_X11 "QMAKE_LIBS_X11")
- SEPARATE_ARGUMENTS(QT_LIBS_X11)
- FOREACH(QT_X11_LIB ${QT_LIBS_X11})
- STRING(REGEX REPLACE "-l" "" QT_X11_LIB "${QT_X11_LIB}")
- SET(QT_TMP_STR "QT_X11_${QT_X11_LIB}_LIBRARY")
- FIND_LIBRARY(${QT_TMP_STR} NAMES "${QT_X11_LIB}" PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(${QT_TMP_STR})
- IF(${QT_TMP_STR})
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${${QT_TMP_STR}})
- ENDIF(${QT_TMP_STR})
- ENDFOREACH(QT_X11_LIB)
+ # X11 libraries Qt always depends on
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xext_LIB} ${X11_X11_LIB})
QT_QUERY_QMAKE(QT_LIBS_THREAD "QMAKE_LIBS_THREAD")
SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_LIBS_THREAD})
- QT_QUERY_QMAKE(QMAKE_LIBS_DYNLOAD "QMAKE_LIBS_DYNLOAD")
- SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QMAKE_LIBS_DYNLOAD})
+ SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_DL_LIBS})
ENDIF(Q_WS_X11)