summaryrefslogtreecommitdiffstats
path: root/Modules/FindX11.cmake
diff options
context:
space:
mode:
authorMatthew Smith <matthew@gentoo.org>2022-03-06 12:21:02 (GMT)
committerMatthew Smith <matthew@gentoo.org>2022-03-08 22:18:46 (GMT)
commit364798fa6b87be4add346036ac68e47cad3bfd14 (patch)
tree4a051dac3f41c85ffeec1ddc745cc019b6f2259f /Modules/FindX11.cmake
parent6b6bdcbb64e1aa2ddac4f09a0807553f5684165a (diff)
downloadCMake-364798fa6b87be4add346036ac68e47cad3bfd14.zip
CMake-364798fa6b87be4add346036ac68e47cad3bfd14.tar.gz
CMake-364798fa6b87be4add346036ac68e47cad3bfd14.tar.bz2
FindX11: Add xcb_randr library
Diffstat (limited to 'Modules/FindX11.cmake')
-rw-r--r--Modules/FindX11.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index fd5ee53..5a9d2a0 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -31,6 +31,7 @@ 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_randr_INCLUDE_PATH, X11_xcb_randr_LIB, X11_xcb_randr_FOUND, X11::xcb_randr
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
@@ -82,6 +83,9 @@ and also the following more fine grained variables and targets:
.. versionadded:: 3.19
Added the ``Xaw``, ``xcb_util``, and ``xcb_xfixes`` libraries.
+.. versionadded:: 3.24
+ Added the ``xcb_randr`` library.
+
#]=======================================================================]
if (UNIX)
@@ -127,6 +131,7 @@ if (UNIX)
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_randr_INCLUDE_PATH xcb/randr.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})
@@ -180,6 +185,7 @@ if (UNIX)
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_randr_LIB xcb-randr ${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})
@@ -281,6 +287,10 @@ if (UNIX)
set(X11_xcb_icccm_FOUND TRUE)
endif ()
+ if (X11_xcb_randr_LIB AND X11_xcb_randr_INCLUDE_PATH)
+ set(X11_xcb_randr_FOUND TRUE)
+ endif ()
+
if (X11_xcb_util_LIB AND X11_xcb_util_INCLUDE_PATH)
set(X11_xcb_util_FOUND TRUE)
endif ()
@@ -600,6 +610,13 @@ if (UNIX)
INTERFACE_LINK_LIBRARIES "X11::xcb")
endif ()
+ if (X11_xcb_randr_FOUND AND NOT TARGET X11::xcb_randr)
+ add_library(X11::xcb_randr UNKNOWN IMPORTED)
+ set_target_properties(X11::xcb_randr PROPERTIES
+ IMPORTED_LOCATION "${X11_xcb_randr_LIB}"
+ 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
@@ -830,6 +847,8 @@ if (UNIX)
X11_xcb_INCLUDE_PATH
X11_xcb_icccm_LIB
X11_xcb_icccm_INCLUDE_PATH
+ X11_xcb_randr_LIB
+ X11_xcb_randr_INCLUDE_PATH
X11_xcb_util_LIB
X11_xcb_util_INCLUDE_PATH
X11_xcb_xfixes_LIB