2001-11-11 07:01:06 +03:00
|
|
|
#
|
2002-09-02 23:46:04 +04:00
|
|
|
# try to find X11 on UNIX systems.
|
2001-11-11 07:01:06 +03:00
|
|
|
#
|
2002-09-02 23:46:04 +04:00
|
|
|
# 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.
|
2002-09-03 14:10:06 +04:00
|
|
|
|
2002-09-02 23:46:04 +04:00
|
|
|
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
|
2001-11-11 07:01:06 +03:00
|
|
|
)
|
2002-09-02 23:46:04 +04:00
|
|
|
|
|
|
|
|
|
|
|
FIND_LIBRARY(X11_X11_LIBRARY X11
|
|
|
|
/usr/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/openwin/lib
|
|
|
|
/usr/X11R6/lib
|
2002-06-15 00:49:00 +04:00
|
|
|
)
|
2001-11-11 07:01:06 +03:00
|
|
|
|
2002-09-02 23:46:04 +04:00
|
|
|
FIND_LIBRARY(X11_Xext_LIBRARY Xext
|
|
|
|
/usr/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/openwin/lib
|
|
|
|
/usr/X11R6/lib
|
2001-11-11 07:01:06 +03:00
|
|
|
)
|
|
|
|
|
2002-09-02 23:46:04 +04:00
|
|
|
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)
|
|
|
|
|
2002-09-03 01:33:51 +04:00
|
|
|
ENDIF(X11_INCLUDE_DIR)
|
2002-06-15 00:49:00 +04:00
|
|
|
|
2002-09-02 23:46:04 +04:00
|
|
|
# Deprecated variable fro backwards compatibility with CMake 1.4
|
|
|
|
SET (X11_LIBRARY ${X11_X11_LIBRARY})
|
2002-09-05 20:00:45 +04:00
|
|
|
|
|
|
|
MARK_AS_ADVANCED(
|
|
|
|
X11_X11_LIBRARY
|
|
|
|
X11_Xext_LIBRARY
|
|
|
|
X11_INCLUDE_DIR
|
|
|
|
)
|
|
|
|
|
2002-09-02 23:46:04 +04:00
|
|
|
ENDIF (UNIX)
|