summaryrefslogtreecommitdiffstats
path: root/Modules/FindX11.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindX11.cmake')
-rw-r--r--Modules/FindX11.cmake120
1 files changed, 60 insertions, 60 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index 1c16af5..0b63bc9 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -151,184 +151,184 @@ if (UNIX)
set(X11_LIBRARY_DIR "")
if(X11_X11_LIB)
get_filename_component(X11_LIBRARY_DIR ${X11_X11_LIB} PATH)
- endif(X11_X11_LIB)
+ endif()
set(X11_INCLUDE_DIR) # start with empty list
if(X11_X11_INCLUDE_PATH)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH})
- endif(X11_X11_INCLUDE_PATH)
+ endif()
if(X11_Xlib_INCLUDE_PATH)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xlib_INCLUDE_PATH})
- endif(X11_Xlib_INCLUDE_PATH)
+ endif()
if(X11_Xutil_INCLUDE_PATH)
set(X11_Xutil_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xutil_INCLUDE_PATH})
- endif(X11_Xutil_INCLUDE_PATH)
+ endif()
if(X11_Xshape_INCLUDE_PATH)
set(X11_Xshape_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xshape_INCLUDE_PATH})
- endif(X11_Xshape_INCLUDE_PATH)
+ endif()
set(X11_LIBRARIES) # start with empty list
if(X11_X11_LIB)
set(X11_LIBRARIES ${X11_LIBRARIES} ${X11_X11_LIB})
- endif(X11_X11_LIB)
+ endif()
if(X11_Xext_LIB)
set(X11_Xext_FOUND TRUE)
set(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xext_LIB})
- endif(X11_Xext_LIB)
+ endif()
if(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH)
set(X11_Xt_FOUND TRUE)
- endif(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH)
+ endif()
if(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH)
set(X11_Xft_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xft_INCLUDE_PATH})
- endif(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH)
+ endif()
if(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH)
set(X11_Xv_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xv_INCLUDE_PATH})
- endif(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH)
+ endif()
if (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH)
set(X11_Xau_FOUND TRUE)
- endif (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH)
+ endif ()
if (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB)
set(X11_Xdmcp_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdmcp_INCLUDE_PATH})
- endif (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB)
+ endif ()
if (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH)
set(X11_Xaccess_FOUND TRUE)
set(X11_Xaccess_INCLUDE_PATH ${X11_Xaccessstr_INCLUDE_PATH})
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xaccess_INCLUDE_PATH})
- endif (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH)
+ endif ()
if (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB)
set(X11_Xpm_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xpm_INCLUDE_PATH})
- endif (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB)
+ endif ()
if (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB)
set(X11_Xcomposite_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcomposite_INCLUDE_PATH})
- endif (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB)
+ endif ()
if (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB)
set(X11_Xdamage_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdamage_INCLUDE_PATH})
- endif (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB)
+ endif ()
if (X11_XShm_INCLUDE_PATH)
set(X11_XShm_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XShm_INCLUDE_PATH})
- endif (X11_XShm_INCLUDE_PATH)
+ endif ()
if (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB)
set(X11_XTest_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XTest_INCLUDE_PATH})
- endif (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB)
+ endif ()
if (X11_Xi_INCLUDE_PATH AND X11_Xi_LIB)
set(X11_Xi_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xi_INCLUDE_PATH})
- endif (X11_Xi_INCLUDE_PATH AND X11_Xi_LIB)
+ endif ()
if (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB)
set(X11_Xinerama_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinerama_INCLUDE_PATH})
- endif (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB)
+ endif ()
if (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB)
set(X11_Xfixes_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xfixes_INCLUDE_PATH})
- endif (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB)
+ endif ()
if (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB)
set(X11_Xrender_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrender_INCLUDE_PATH})
- endif (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB)
+ endif ()
if (X11_XRes_INCLUDE_PATH AND X11_XRes_LIB)
set(X11_XRes_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XRes_INCLUDE_PATH})
- endif (X11_XRes_INCLUDE_PATH AND X11_XRes_LIB)
+ endif ()
if (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB)
set(X11_Xrandr_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrandr_INCLUDE_PATH})
- endif (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB)
+ endif ()
if (X11_xf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB)
set(X11_xf86misc_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_xf86misc_INCLUDE_PATH})
- endif (X11_xf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB)
+ endif ()
if (X11_xf86vmode_INCLUDE_PATH AND X11_Xxf86vm_LIB)
set(X11_xf86vmode_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_xf86vmode_INCLUDE_PATH})
- endif (X11_xf86vmode_INCLUDE_PATH AND X11_Xxf86vm_LIB)
+ endif ()
if (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB)
set(X11_Xcursor_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcursor_INCLUDE_PATH})
- endif (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB)
+ endif ()
if (X11_Xscreensaver_INCLUDE_PATH AND X11_Xscreensaver_LIB)
set(X11_Xscreensaver_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xscreensaver_INCLUDE_PATH})
- endif (X11_Xscreensaver_INCLUDE_PATH AND X11_Xscreensaver_LIB)
+ endif ()
if (X11_dpms_INCLUDE_PATH)
set(X11_dpms_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_dpms_INCLUDE_PATH})
- endif (X11_dpms_INCLUDE_PATH)
+ endif ()
if (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH)
set(X11_Xkb_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkb_INCLUDE_PATH} )
- endif (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH)
+ endif ()
if (X11_Xkbfile_INCLUDE_PATH AND X11_Xkbfile_LIB AND X11_Xlib_INCLUDE_PATH)
set(X11_Xkbfile_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkbfile_INCLUDE_PATH} )
- endif (X11_Xkbfile_INCLUDE_PATH AND X11_Xkbfile_LIB AND X11_Xlib_INCLUDE_PATH)
+ endif ()
if (X11_Xmu_INCLUDE_PATH AND X11_Xmu_LIB)
set(X11_Xmu_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xmu_INCLUDE_PATH})
- endif (X11_Xmu_INCLUDE_PATH AND X11_Xmu_LIB)
+ endif ()
if (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
set(X11_Xinput_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinput_INCLUDE_PATH})
- endif (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
+ endif ()
if (X11_XSync_INCLUDE_PATH)
set(X11_XSync_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XSync_INCLUDE_PATH})
- endif (X11_XSync_INCLUDE_PATH)
+ endif ()
if(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
set(X11_ICE_FOUND TRUE)
- endif(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
+ endif()
if(X11_SM_LIB AND X11_SM_INCLUDE_PATH)
set(X11_SM_FOUND TRUE)
- endif(X11_SM_LIB AND X11_SM_INCLUDE_PATH)
+ endif()
# Deprecated variable for backwards compatibility with CMake 1.4
if (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
set(X11_FOUND 1)
- endif (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
+ endif ()
if(X11_FOUND)
include(CheckFunctionExists)
@@ -338,7 +338,7 @@ if (UNIX)
# See libs.m4 in autoconf's m4 directory.
if($ENV{ISC} MATCHES "^yes$")
set(X11_X_EXTRA_LIBS -lnsl_s -linet)
- else($ENV{ISC} MATCHES "^yes$")
+ else()
set(X11_X_EXTRA_LIBS "")
# See if XOpenDisplay in X11 works by itself.
@@ -348,13 +348,13 @@ if (UNIX)
CHECK_LIBRARY_EXISTS("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_DNET_NTOA)
if (X11_LIB_DNET_HAS_DNET_NTOA)
set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet)
- else (X11_LIB_DNET_HAS_DNET_NTOA)
+ else ()
CHECK_LIBRARY_EXISTS("dnet_stub" "dnet_ntoa" "" X11_LIB_DNET_STUB_HAS_DNET_NTOA)
if (X11_LIB_DNET_STUB_HAS_DNET_NTOA)
set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet_stub)
- endif (X11_LIB_DNET_STUB_HAS_DNET_NTOA)
- endif (X11_LIB_DNET_HAS_DNET_NTOA)
- endif(NOT X11_LIB_X11_SOLO)
+ endif ()
+ endif ()
+ endif()
# Find library needed for gethostbyname.
CHECK_FUNCTION_EXISTS("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME)
@@ -362,13 +362,13 @@ if (UNIX)
CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
if (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lnsl)
- else (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
+ else ()
CHECK_LIBRARY_EXISTS("bsd" "gethostbyname" "" CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
if (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lbsd)
- endif (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
- endif (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
- endif(NOT CMAKE_HAVE_GETHOSTBYNAME)
+ endif ()
+ endif ()
+ endif()
# Find library needed for connect.
CHECK_FUNCTION_EXISTS("connect" CMAKE_HAVE_CONNECT)
@@ -376,8 +376,8 @@ if (UNIX)
CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_LIB_SOCKET_HAS_CONNECT)
if (CMAKE_LIB_SOCKET_HAS_CONNECT)
set (X11_X_EXTRA_LIBS -lsocket ${X11_X_EXTRA_LIBS})
- endif (CMAKE_LIB_SOCKET_HAS_CONNECT)
- endif(NOT CMAKE_HAVE_CONNECT)
+ endif ()
+ endif()
# Find library needed for remove.
CHECK_FUNCTION_EXISTS("remove" CMAKE_HAVE_REMOVE)
@@ -385,8 +385,8 @@ if (UNIX)
CHECK_LIBRARY_EXISTS("posix" "remove" "" CMAKE_LIB_POSIX_HAS_REMOVE)
if (CMAKE_LIB_POSIX_HAS_REMOVE)
set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lposix)
- endif (CMAKE_LIB_POSIX_HAS_REMOVE)
- endif(NOT CMAKE_HAVE_REMOVE)
+ endif ()
+ endif()
# Find library needed for shmat.
CHECK_FUNCTION_EXISTS("shmat" CMAKE_HAVE_SHMAT)
@@ -394,9 +394,9 @@ if (UNIX)
CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_LIB_IPS_HAS_SHMAT)
if (CMAKE_LIB_IPS_HAS_SHMAT)
set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lipc)
- endif (CMAKE_LIB_IPS_HAS_SHMAT)
- endif(NOT CMAKE_HAVE_SHMAT)
- endif($ENV{ISC} MATCHES "^yes$")
+ endif ()
+ endif()
+ endif()
if (X11_ICE_FOUND)
CHECK_LIBRARY_EXISTS("ICE" "IceConnectionNumber" "${X11_LIBRARY_DIR}"
@@ -405,9 +405,9 @@ if (UNIX)
set (X11_X_PRE_LIBS ${X11_ICE_LIB})
if(X11_SM_LIB)
set (X11_X_PRE_LIBS ${X11_SM_LIB} ${X11_X_PRE_LIBS})
- endif(X11_SM_LIB)
- endif(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
- endif (X11_ICE_FOUND)
+ endif()
+ endif()
+ endif ()
# Build the final list of libraries.
set(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS})
@@ -415,11 +415,11 @@ if (UNIX)
include(FindPackageMessage)
FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
"[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
- else (X11_FOUND)
+ else ()
if (X11_FIND_REQUIRED)
message(FATAL_ERROR "Could not find X11")
- endif (X11_FIND_REQUIRED)
- endif (X11_FOUND)
+ endif ()
+ endif ()
mark_as_advanced(
X11_X11_INCLUDE_PATH
@@ -487,6 +487,6 @@ if (UNIX)
X11_XSync_INCLUDE_PATH
)
set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE})
-endif (UNIX)
+endif ()
# X11_FIND_REQUIRED_<component> could be checked too