diff options
author | Ian Scott <ian.m.scott@stud.man.ac.uk> | 2002-09-02 19:46:04 (GMT) |
---|---|---|
committer | Ian Scott <ian.m.scott@stud.man.ac.uk> | 2002-09-02 19:46:04 (GMT) |
commit | c82608591728c8c88d0ef596655808eda93664a2 (patch) | |
tree | cc04202251556d479088130de8b623a49d0e47e2 /Modules/FindX11.cmake | |
parent | 8600beb1ed81dccbe427c78d501c81a6c46eee69 (diff) | |
download | CMake-c82608591728c8c88d0ef596655808eda93664a2.zip CMake-c82608591728c8c88d0ef596655808eda93664a2.tar.gz CMake-c82608591728c8c88d0ef596655808eda93664a2.tar.bz2 |
Copied the X11 PNG and ZLIB functoinality from VXL
Diffstat (limited to 'Modules/FindX11.cmake')
-rw-r--r-- | Modules/FindX11.cmake | 69 |
1 files changed, 44 insertions, 25 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake index 6043a35..7d203cc 100644 --- a/Modules/FindX11.cmake +++ b/Modules/FindX11.cmake @@ -1,33 +1,52 @@ # -# try to find X11 libraries on UNIX systems once done this will define +# try to find X11 on UNIX systems. # -# X11_INCLUDE_PATH = where the X11 include directory can be found -# X11_LIBRARY = the name of the X11 library to link with -# - -IF (WIN32) - SET (X11_LIBRARY x11 CACHE STRING "X11 library") -ELSE (WIN32) - FIND_PATH(X11_INCLUDE_PATH X11.h - /usr/include - /usr/local/include - /usr/openwin/share/include - /opt/graphics/OpenGL/include - /usr/X11R6/include +# The following values are defined +# X11_INCLUDE_DIR - where to find X11.h +# X11_LIBRARIES - link against these to use X11 +# X11_FOUND - True if X11 is available +# X11_Xext_FOUND - True if the X11 extensions are available. +IF (UNIX) + + FIND_PATH(X11_INCLUDE_DIR X11/X.h + /usr/include + /usr/local/include + /usr/openwin/include + /usr/openwin/share/include + /usr/X11R6/include + /usr/include/X11 + /opt/graphics/OpenGL/include ) - MARK_AS_ADVANCED( - X11_INCLUDE_PATH + + + FIND_LIBRARY(X11_X11_LIBRARY X11 + /usr/lib + /usr/local/lib + /usr/openwin/lib + /usr/X11R6/lib ) - FIND_LIBRARY(X11_LIBRARY libX11.so - /usr/lib - /usr/local/lib - /usr/X11R6/lib - /usr/openwin/lib + FIND_LIBRARY(X11_Xext_LIBRARY Xext + /usr/lib + /usr/local/lib + /usr/openwin/lib + /usr/X11R6/lib ) -ENDIF (WIN32) + IF(X11_INCLUDE_DIR) + + IF(X11_X11_LIBRARY) + SET( X11_FOUND "YES" ) + SET( X11_LIBRARIES ${X11_X11_LIBRARY} ) + ENDIF(X11_X11_LIBRARY) + + IF(X11_Xext_LIBRARY) + SET( X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xext_LIBRARY} ) + SET( X11_Xext_FOUND "YES") + ENDIF(X11_Xext_LIBRARY) + + ENDIF(X11_INCLUDE_PATH) -MARK_AS_ADVANCED( - X11_LIBRARY -) + # Deprecated variable fro backwards compatibility with CMake 1.4 + SET (X11_LIBRARY ${X11_X11_LIBRARY}) +ENDIF (UNIX) |