Copied the X11 PNG and ZLIB functoinality from VXL

This commit is contained in:
Ian Scott 2002-09-02 15:46:04 -04:00
parent 8600beb1ed
commit c826085917
3 changed files with 46 additions and 49 deletions

View File

@ -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.

View File

@ -1,33 +1,52 @@
#
# try to find X11 libraries on UNIX systems once done this will define
#
# X11_INCLUDE_PATH = where the X11 include directory can be found
# X11_LIBRARY = the name of the X11 library to link with
# try to find X11 on UNIX systems.
#
# 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)
IF (WIN32)
SET (X11_LIBRARY x11 CACHE STRING "X11 library")
ELSE (WIN32)
FIND_PATH(X11_INCLUDE_PATH X11.h
FIND_PATH(X11_INCLUDE_DIR X11/X.h
/usr/include
/usr/local/include
/usr/openwin/include
/usr/openwin/share/include
/opt/graphics/OpenGL/include
/usr/X11R6/include
)
MARK_AS_ADVANCED(
X11_INCLUDE_PATH
/usr/include/X11
/opt/graphics/OpenGL/include
)
FIND_LIBRARY(X11_LIBRARY libX11.so
FIND_LIBRARY(X11_X11_LIBRARY X11
/usr/lib
/usr/local/lib
/usr/X11R6/lib
/usr/openwin/lib
/usr/X11R6/lib
)
ENDIF (WIN32)
FIND_LIBRARY(X11_Xext_LIBRARY Xext
/usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
)
MARK_AS_ADVANCED(
X11_LIBRARY
)
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)
# Deprecated variable fro backwards compatibility with CMake 1.4
SET (X11_LIBRARY ${X11_X11_LIBRARY})
ENDIF (UNIX)

View File

@ -1,23 +0,0 @@
#
# 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)