diff options
author | Matthew Smith <matthew@gentoo.org> | 2022-03-06 12:21:02 (GMT) |
---|---|---|
committer | Matthew Smith <matthew@gentoo.org> | 2022-03-08 22:18:46 (GMT) |
commit | 364798fa6b87be4add346036ac68e47cad3bfd14 (patch) | |
tree | 4a051dac3f41c85ffeec1ddc745cc019b6f2259f /Tests/FindX11 | |
parent | 6b6bdcbb64e1aa2ddac4f09a0807553f5684165a (diff) | |
download | CMake-364798fa6b87be4add346036ac68e47cad3bfd14.zip CMake-364798fa6b87be4add346036ac68e47cad3bfd14.tar.gz CMake-364798fa6b87be4add346036ac68e47cad3bfd14.tar.bz2 |
FindX11: Add xcb_randr library
Diffstat (limited to 'Tests/FindX11')
-rw-r--r-- | Tests/FindX11/Test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/FindX11/Test/main.c | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/Tests/FindX11/Test/CMakeLists.txt b/Tests/FindX11/Test/CMakeLists.txt index 5b304d9..ddee835 100644 --- a/Tests/FindX11/Test/CMakeLists.txt +++ b/Tests/FindX11/Test/CMakeLists.txt @@ -33,6 +33,7 @@ test_x11_component(x11_components Xaw) test_x11_component(x11_components xcb) test_x11_component(x11_components X11_xcb) test_x11_component(x11_components xcb_icccm) +test_x11_component(x11_components xcb_randr) test_x11_component(x11_components xcb_util) test_x11_component(x11_components xcb_xfixes) test_x11_component(x11_components xcb_xkb) @@ -74,6 +75,7 @@ foreach(lib xcb X11_xcb xcb_icccm + xcb_randr xcb_util xcb_xfixes Xcomposite diff --git a/Tests/FindX11/Test/main.c b/Tests/FindX11/Test/main.c index b44ae28..ce6f224 100644 --- a/Tests/FindX11/Test/main.c +++ b/Tests/FindX11/Test/main.c @@ -336,6 +336,20 @@ static void test_xcb(void) xcb_disconnect(connection); } +# ifdef HAVE_xcb_randr +# include <xcb/randr.h> + +static void test_xcb_randr(void) +{ + int screen_nbr; + xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr); + xcb_randr_query_version_cookie_t cookie = + xcb_randr_query_version(connection, 0, 0); + xcb_disconnect(connection); +} + +# endif + # ifdef HAVE_xcb_util # include <xcb/xcb_aux.h> @@ -455,6 +469,9 @@ int main(int argc, char* argv[]) test_xcb, #endif #ifdef HAVE_xcb_util + test_xcb_randr, +#endif +#ifdef HAVE_xcb_util test_xcb_util, #endif #ifdef HAVE_xcb_xfixes |