summaryrefslogtreecommitdiffstats
path: root/Modules/FindX11.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindX11.cmake')
-rw-r--r--Modules/FindX11.cmake47
1 files changed, 47 insertions, 0 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index ccd0252..a865597 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -28,6 +28,8 @@ and also the following more fine grained variables and targets:
X11_xcb_INCLUDE_PATH, X11_xcb_LIB, X11_xcb_FOUND, X11::xcb
X11_X11_xcb_INCLUDE_PATH, X11_X11_xcb_LIB, X11_X11_xcb_FOUND, X11::X11_xcb
X11_xcb_icccm_INCLUDE_PATH, X11_xcb_icccm_LIB, X11_xcb_icccm_FOUND, X11::xcb_icccm
+ X11_xcb_util_INCLUDE_PATH, X11_xcb_util_LIB, X11_xcb_util_FOUND, X11::xcb_util
+ X11_xcb_xfixes_INCLUDE_PATH, X11_xcb_xfixes_LIB, X11_xcb_xfixes_FOUND, X11::xcb_xfixes
X11_xcb_xkb_INCLUDE_PATH, X11_xcb_xkb_LIB, X11_xcb_xkb_FOUND, X11::xcb_xkb
X11_Xcomposite_INCLUDE_PATH, X11_Xcomposite_LIB, X11_Xcomposite_FOUND, X11::Xcomposite
X11_Xcursor_INCLUDE_PATH, X11_Xcursor_LIB, X11_Xcursor_FOUND, X11::Xcursor
@@ -59,6 +61,7 @@ and also the following more fine grained variables and targets:
X11_XShm_INCLUDE_PATH, (in X11_Xext_LIB), X11_XShm_FOUND
X11_Xshape_INCLUDE_PATH, (in X11_Xext_LIB), X11_Xshape_FOUND
X11_XSync_INCLUDE_PATH, (in X11_Xext_LIB), X11_XSync_FOUND
+ X11_Xaw_INCLUDE_PATH, X11_Xaw_LIB X11_Xaw_FOUND X11::Xaw
#]=======================================================================]
if (UNIX)
@@ -100,9 +103,12 @@ if (UNIX)
find_path(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH})
find_path(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH})
find_path(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xaw_INCLUDE_PATH X11/Xaw/Intrinsic.h ${X11_INC_SEARCH_PATH})
find_path(X11_xcb_INCLUDE_PATH xcb/xcb.h ${X11_INC_SEARCH_PATH})
find_path(X11_X11_xcb_INCLUDE_PATH X11/Xlib-xcb.h ${X11_INC_SEARCH_PATH})
find_path(X11_xcb_icccm_INCLUDE_PATH xcb/xcb_icccm.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_xcb_util_INCLUDE_PATH xcb/xcb_aux.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_xcb_xfixes_INCLUDE_PATH xcb/xfixes.h ${X11_INC_SEARCH_PATH})
find_path(X11_Xcomposite_INCLUDE_PATH X11/extensions/Xcomposite.h ${X11_INC_SEARCH_PATH})
find_path(X11_Xcursor_INCLUDE_PATH X11/Xcursor/Xcursor.h ${X11_INC_SEARCH_PATH})
find_path(X11_Xdamage_INCLUDE_PATH X11/extensions/Xdamage.h ${X11_INC_SEARCH_PATH})
@@ -134,6 +140,8 @@ if (UNIX)
find_path(X11_Xv_INCLUDE_PATH X11/extensions/Xvlib.h ${X11_INC_SEARCH_PATH})
find_path(X11_XSync_INCLUDE_PATH X11/extensions/sync.h ${X11_INC_SEARCH_PATH})
+
+
# Backwards compatibility.
set(X11_Xinput_INCLUDE_PATH "${X11_Xi_INCLUDE_PATH}")
set(X11_xf86misc_INCLUDE_PATH "${X11_Xxf86misc_INCLUDE_PATH}")
@@ -148,9 +156,12 @@ if (UNIX)
find_library(X11_ICE_LIB ICE ${X11_LIB_SEARCH_PATH})
find_library(X11_SM_LIB SM ${X11_LIB_SEARCH_PATH})
find_library(X11_Xau_LIB Xau ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xaw_LIB Xaw ${X11_LIB_SEARCH_PATH})
find_library(X11_xcb_LIB xcb ${X11_LIB_SEARCH_PATH})
find_library(X11_X11_xcb_LIB X11-xcb ${X11_LIB_SEARCH_PATH})
find_library(X11_xcb_icccm_LIB xcb-icccm ${X11_LIB_SEARCH_PATH})
+ find_library(X11_xcb_util_LIB xcb-util ${X11_LIB_SEARCH_PATH})
+ find_library(X11_xcb_xfixes_LIB xcb-xfixes ${X11_LIB_SEARCH_PATH})
find_library(X11_xcb_xkb_LIB xcb-xkb ${X11_LIB_SEARCH_PATH})
find_library(X11_Xcomposite_LIB Xcomposite ${X11_LIB_SEARCH_PATH})
find_library(X11_Xcursor_LIB Xcursor ${X11_LIB_SEARCH_PATH})
@@ -250,6 +261,14 @@ if (UNIX)
set(X11_xcb_icccm_FOUND TRUE)
endif ()
+ if (X11_xcb_util_LIB AND X11_xcb_util_INCLUDE_PATH)
+ set(X11_xcb_util_FOUND TRUE)
+ endif ()
+
+ if (X11_xcb_xfixes_LIB)
+ set(X11_xcb_xfixes_FOUND TRUE)
+ endif ()
+
if (X11_xcb_xkb_LIB)
set(X11_xcb_xkb_FOUND TRUE)
endif ()
@@ -392,6 +411,10 @@ if (UNIX)
set(X11_SM_FOUND TRUE)
endif()
+ if(X11_Xaw_LIB AND X11_Xaw_INCLUDE_PATH)
+ set(X11_Xaw_FOUND TRUE)
+ endif()
+
# Most of the X11 headers will be in the same directories, avoid
# creating a huge list of duplicates.
if (X11_INCLUDE_DIR)
@@ -527,6 +550,14 @@ if (UNIX)
INTERFACE_INCLUDE_DIRECTORIES "${X11_Xau_INCLUDE_PATH}")
endif ()
+ if (X11_Xaw_FOUND AND NOT TARGET X11::Xaw)
+ add_library(X11::Xaw UNKNOWN IMPORTED)
+ set_target_properties(X11::Xaw PROPERTIES
+ IMPORTED_LOCATION "${X11_Xaw_LIB}"
+ INTERFACE_INCLUDE_DIRECTORIES "${X11_Xaw_INCLUDE_PATH}"
+ INTERFACE_LINK_LIBRARIES "X11::Xext;X11::Xmu;X11::Xt;X11::Xpm;X11::X11")
+ endif ()
+
if (X11_xcb_FOUND AND NOT TARGET X11::xcb)
add_library(X11::xcb UNKNOWN IMPORTED)
set_target_properties(X11::xcb PROPERTIES
@@ -549,6 +580,20 @@ if (UNIX)
INTERFACE_LINK_LIBRARIES "X11::xcb")
endif ()
+ if (X11_xcb_util_FOUND AND NOT TARGET X11::xcb_util)
+ add_library(X11::xcb_util UNKNOWN IMPORTED)
+ set_target_properties(X11::xcb_util PROPERTIES
+ IMPORTED_LOCATION "${X11_xcb_util_LIB}"
+ INTERFACE_LINK_LIBRARIES "X11::xcb")
+ endif ()
+
+ if (X11_xcb_xfixes_FOUND AND NOT TARGET X11::xcb_xfixes)
+ add_library(X11::xcb_xfixes UNKNOWN IMPORTED)
+ set_target_properties(X11::xcb_xfixes PROPERTIES
+ IMPORTED_LOCATION "${X11_xcb_xfixes_LIB}"
+ INTERFACE_LINK_LIBRARIES "X11::xcb")
+ endif ()
+
if (X11_xcb_xkb_FOUND AND NOT TARGET X11::xcb_xkb)
add_library(X11::xcb_xkb UNKNOWN IMPORTED)
set_target_properties(X11::xcb_xkb PROPERTIES
@@ -825,6 +870,8 @@ if (UNIX)
X11_SM_LIB
X11_SM_INCLUDE_PATH
X11_XSync_INCLUDE_PATH
+ X11_Xaw_LIB
+ X11_Xaw_INCLUDE_PATH
)
set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE})
set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE})