Commit c8260859 authored by Ian Scott's avatar Ian Scott

Copied the X11 PNG and ZLIB functoinality from VXL

parent 8600beb1
......@@ -6,6 +6,7 @@
# PNG_INCLUDE_DIR, where to find png.h, etc.
# PNG_LIBRARIES, the libraries to link against to use PNG.
# PNG_FOUND, If false, do try to use PNG.
# PNG_DEFINITIONS - You should ADD_DEFINITONS(${PNG_DEFINITIONS}) before compiling code that includes png library files.
# also defined, but not for general use are
# PNG_LIBRARY, where to find the PNG library.
......
#
# 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)
#
# Find the native ZLIB includes and library
#
# ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
# ZLIB_LIBRARIES - List of fully qualified libraries to link against when using zlib.
# ZLIB_FOUND - Do not attempt to use zlib if "no" or undefined.
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
/usr/local/include
/usr/include
)
FIND_LIBRARY(ZLIB_LIBRARY z
/usr/lib
/usr/local/lib
)
IF(ZLIB_INCLUDE_DIR)
IF(ZLIB_LIBRARY)
SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
SET( ZLIB_FOUND "YES" )
ENDIF(ZLIB_LIBRARY)
ENDIF(ZLIB_INCLUDE_DIR)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment