Copied the X11 PNG and ZLIB functoinality from VXL
This commit is contained in:
parent
8600beb1ed
commit
c826085917
|
@ -6,6 +6,7 @@
|
||||||
# PNG_INCLUDE_DIR, where to find png.h, etc.
|
# PNG_INCLUDE_DIR, where to find png.h, etc.
|
||||||
# PNG_LIBRARIES, the libraries to link against to use PNG.
|
# PNG_LIBRARIES, the libraries to link against to use PNG.
|
||||||
# PNG_FOUND, If false, do try 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
|
# also defined, but not for general use are
|
||||||
# PNG_LIBRARY, where to find the PNG library.
|
# PNG_LIBRARY, where to find the PNG library.
|
||||||
|
|
|
@ -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
|
# The following values are defined
|
||||||
# X11_LIBRARY = the name of the X11 library to link with
|
# X11_INCLUDE_DIR - where to find X11.h
|
||||||
#
|
# X11_LIBRARIES - link against these to use X11
|
||||||
|
# X11_FOUND - True if X11 is available
|
||||||
IF (WIN32)
|
# X11_Xext_FOUND - True if the X11 extensions are available.
|
||||||
SET (X11_LIBRARY x11 CACHE STRING "X11 library")
|
IF (UNIX)
|
||||||
ELSE (WIN32)
|
|
||||||
FIND_PATH(X11_INCLUDE_PATH X11.h
|
FIND_PATH(X11_INCLUDE_DIR X11/X.h
|
||||||
/usr/include
|
/usr/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/usr/openwin/share/include
|
/usr/openwin/include
|
||||||
/opt/graphics/OpenGL/include
|
/usr/openwin/share/include
|
||||||
/usr/X11R6/include
|
/usr/X11R6/include
|
||||||
)
|
/usr/include/X11
|
||||||
MARK_AS_ADVANCED(
|
/opt/graphics/OpenGL/include
|
||||||
X11_INCLUDE_PATH
|
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(X11_LIBRARY libX11.so
|
|
||||||
/usr/lib
|
FIND_LIBRARY(X11_X11_LIBRARY X11
|
||||||
/usr/local/lib
|
/usr/lib
|
||||||
/usr/X11R6/lib
|
/usr/local/lib
|
||||||
/usr/openwin/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(
|
IF(X11_INCLUDE_DIR)
|
||||||
X11_LIBRARY
|
|
||||||
)
|
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)
|
||||||
|
|
|
@ -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)
|
|
Loading…
Reference in New Issue