diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-06-01 13:17:23 -0400 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-06-01 13:17:23 -0400 |
commit | f94b8cfd3cf494d204db0d0454063b77197e2ec6 (patch) | |
tree | 2cfc587fdeb6b4098ab5517f7948b57c60891996 /Modules/FindX11.cmake | |
parent | eddf1cf39f50f9b06131ead26b5b84b8edfd60da (diff) | |
download | cmake-f94b8cfd3cf494d204db0d0454063b77197e2ec6.tar.gz |
COMP: fix warnings on some machines where some X libs apparently don't
really work by reverting X11_LIBRARIES back to the old version
-add some more X11_xxx_FOUND variables
-reformat comments at the top
-always use IF(INCLUDE_DIR and LIB) for setting FOUND to TRUE
Alex
Diffstat (limited to 'Modules/FindX11.cmake')
-rw-r--r-- | Modules/FindX11.cmake | 85 |
1 files changed, 55 insertions, 30 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake index f5f3635a50..3dae6e0866 100644 --- a/Modules/FindX11.cmake +++ b/Modules/FindX11.cmake @@ -5,17 +5,35 @@ # X11_LIBRARIES - link against these to use X11 # # and also the following more fine grained variables: -# Include paths: X11_ICE_INCLUDE_PATH X11_Xaccessrules_INCLUDE_PATH, X11_Xaccessstr_INCLUDE_PATH, -# X11_Xcomposite_INCLUDE_PATH, X11_Xcursor_INCLUDE_PATH, X11_Xdamage_INCLUDE_PATH, -# X11_Xdmcp_INCLUDE_PATH, X11_dpms_INCLUDE_PATH, X11_Xf86misc_INCLUDE_PATH, X11_xf86vmode_INCLUDE_PATH, -# X11_Xfixes_INCLUDE_PATH, X11_Xft_INCLUDE_PATH, X11_Xinerama_INCLUDE_PATH, X11_Xinput_INCLUDE_PATH, -# X11_Xkb_INCLUDE_PATH, X11_Xkblib_INCLUDE_PATH, X11_Xpm_INCLUDE_PATH, X11_XTest_INCLUDE_PATH, -# X11_XShm_INCLUDE_PATH, X11_Xrandr_INCLUDE_PATH, X11_Xrender_INCLUDE_PATH, -# X11_Xscreensaver_INCLUDE_PATH, X11_Xshape_INCLUDE_PATH, X11_Xutil_INCLUDE_PATH, X11_Xv_INCLUDE_PATH -# -# Libraries: X11_ICE_LIB, X11_Xau_LIB, X11_Xcomposite_LIB, X11_Xcursor_LIB, X11_Xdamage_LIB Xdamage, -# X11_Xdmcp_LIB, X11_Xext_LIB, X11_Xfixes_LIB, X11_Xft_LIB, X11_Xinerama_LIB, X11_Xinput_LIB, -# X11_Xpm_LIB, X11_Xrandr_LIB, X11_Xrender_LIB, X11_Xss_LIB, X11_Xt_LIB, X11_XTest_LIB, X11_Xv_LIB, X11_Xxf86misc_LIB +# Include paths: X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND +# X11_Xaccessrules_INCLUDE_PATH, X11_Xaccess_FOUND +# X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND +# X11_Xau_INCLUDE_PATH, X11_Xau_LIB, X11_Xau_FOUND +# X11_Xcomposite_INCLUDE_PATH, X11_Xcomposite_LIB, X11_Xcomposite_FOUND +# X11_Xcursor_INCLUDE_PATH, X11_Xcursor_LIB, X11_Xcursor_FOUND +# X11_Xdamage_INCLUDE_PATH, X11_Xdamage_LIB, X11_Xdamage_FOUND +# X11_Xdmcp_INCLUDE_PATH, X11_Xdmcp_LIB, X11_Xdmcp_FOUND +# X11_dpms_INCLUDE_PATH, X11_dpms_FOUND +# X11_Xext_LIB, X11_Xext_FOUND +# X11_Xf86misc_INCLUDE_PATH, X11_Xxf86misc_LIB, X11_Xf86misc_FOUND +# X11_xf86vmode_INCLUDE_PATH, X11_Xf86vmode_FOUND +# X11_Xfixes_INCLUDE_PATH, X11_Xfixes_LIB, X11_Xfixes_FOUND +# X11_Xft_INCLUDE_PATH, X11_Xft_LIB, X11_Xft_FOUND +# X11_Xinerama_INCLUDE_PATH, X11_Xinerama_LIB, X11_Xinerama_FOUND +# X11_Xinput_INCLUDE_PATH, X11_Xinput_LIB, X11_Xinput_FOUND +# X11_Xkb_INCLUDE_PATH, X11_Xkb_FOUND +# X11_Xkblib_INCLUDE_PATH, X11_Xkb_FOUND +# X11_Xpm_INCLUDE_PATH, X11_Xpm_LIB, X11_Xpm_FOUND +# X11_XTest_INCLUDE_PATH, X11_XTest_LIB, X11_XTest_FOUND +# X11_XShm_INCLUDE_PATH, X11_XShm_FOUND +# X11_Xrandr_INCLUDE_PATH, X11_Xrandr_LIB, X11_Xrandr_FOUND +# X11_Xrender_INCLUDE_PATH, X11_Xrender_LIB, X11_Xrender_FOUND +# X11_Xscreensaver_INCLUDE_PATH, X11_Xscreensaver_FOUND +# X11_Xshape_INCLUDE_PATH, X11_Xshape_FOUND +# X11_Xss_LIB, X11_Xss_FOUND +# X11_Xt_LIB, X11_Xt_FOUND +# X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND +# X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND # Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. # See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. @@ -55,6 +73,7 @@ IF (UNIX) FIND_PATH(X11_ICE_INCLUDE_PATH X11/ICE/ICE.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xcomposite_INCLUDE_PATH X11/extensions/Xcomposite.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xcursor_INCLUDE_PATH X11/Xcursor/Xcursor.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xdamage_INCLUDE_PATH X11/extensions/Xdamage.h ${X11_INC_SEARCH_PATH}) @@ -116,6 +135,7 @@ IF (UNIX) ENDIF(X11_Xlib_INCLUDE_PATH) IF(X11_Xutil_INCLUDE_PATH) + SET(X11_Xutil_FOUND TRUE) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xutil_INCLUDE_PATH}) ENDIF(X11_Xutil_INCLUDE_PATH) @@ -129,12 +149,20 @@ IF (UNIX) ENDIF(X11_X11_LIB) IF(X11_Xext_LIB) + SET(X11_Xext_FOUND TRUE) SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xext_LIB}) ENDIF(X11_Xext_LIB) + IF(X11_Xss_LIB) + SET(X11_Xss_FOUND TRUE) + ENDIF(X11_Xss_LIB) + + IF(X11_Xt_LIB) + SET(X11_Xt_FOUND TRUE) + ENDIF(X11_Xt_LIB) + IF(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH) - SET(X11_XFT_FOUND TRUE) - SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xft_LIB}) + SET(X11_Xft_FOUND TRUE) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xft_INCLUDE_PATH}) ENDIF(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH) @@ -143,14 +171,12 @@ IF (UNIX) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xv_INCLUDE_PATH}) ENDIF(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH) - IF (X11_Xau_LIB) + IF (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH) SET(X11_Xau_FOUND TRUE) - SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xau_LIB}) - ENDIF (X11_Xau_LIB) + ENDIF (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH) IF (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB) SET(X11_Xdmcp_FOUND TRUE) - SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xdmcp_LIB}) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdmcp_INCLUDE_PATH}) ENDIF (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB) @@ -162,19 +188,18 @@ IF (UNIX) IF (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB) SET(X11_Xpm_FOUND TRUE) - SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xpm_LIB}) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xpm_INCLUDE_PATH}) ENDIF (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB) - IF (X11_Xcomposite_INCLUDE_PATH) + IF (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB) SET(X11_Xcomposite_FOUND TRUE) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcomposite_INCLUDE_PATH}) - ENDIF (X11_Xcomposite_INCLUDE_PATH) + ENDIF (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB) - IF (X11_Xdamage_INCLUDE_PATH) + IF (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB) SET(X11_Xdamage_FOUND TRUE) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdamage_INCLUDE_PATH}) - ENDIF (X11_Xdamage_INCLUDE_PATH) + ENDIF (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB) IF (X11_XShm_INCLUDE_PATH) SET(X11_XShm_FOUND TRUE) @@ -186,30 +211,30 @@ IF (UNIX) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XTest_INCLUDE_PATH}) ENDIF (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB) - IF (X11_Xinerama_INCLUDE_PATH) + IF (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB) SET(X11_Xinerama_FOUND TRUE) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinerama_INCLUDE_PATH}) - ENDIF (X11_Xinerama_INCLUDE_PATH) + ENDIF (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB) - IF (X11_Xfixes_INCLUDE_PATH) + IF (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB) SET(X11_Xfixes_FOUND TRUE) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xfixes_INCLUDE_PATH}) - ENDIF (X11_Xfixes_INCLUDE_PATH) + ENDIF (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB) IF (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB) SET(X11_Xrender_FOUND TRUE) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrender_INCLUDE_PATH}) ENDIF (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB) - IF (X11_Xrandr_INCLUDE_PATH) + IF (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB) SET(X11_Xrandr_FOUND TRUE) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrandr_INCLUDE_PATH}) - ENDIF (X11_Xrandr_INCLUDE_PATH) + ENDIF (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB) - IF (X11_Xxf86misc_INCLUDE_PATH) + IF (X11_Xxf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB) SET(X11_Xxf86misc_FOUND TRUE) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xxf86misc_INCLUDE_PATH}) - ENDIF (X11_Xxf86misc_INCLUDE_PATH) + ENDIF (X11_Xxf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB) IF (X11_xf86vmode_INCLUDE_PATH) SET(X11_xf86vmode_FOUND TRUE) |