diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-26 19:43:57 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-26 19:43:57 (GMT) |
commit | b8937a992b956b16a9181737f695ca118c5eea49 (patch) | |
tree | 02b30e7d14f767c28e0ef69af3351f343d7bf8c9 /Tests/FindX11 | |
parent | d13bd6ec3d7232b4b62d3106684f4f57951f3b28 (diff) | |
parent | 9fa7afe7d332ced27264f1ef7c921aa1d95bc476 (diff) | |
download | CMake-b8937a992b956b16a9181737f695ca118c5eea49.zip CMake-b8937a992b956b16a9181737f695ca118c5eea49.tar.gz CMake-b8937a992b956b16a9181737f695ca118c5eea49.tar.bz2 |
Merge branch 'release' into ninja-multi-per-config-sources
Diffstat (limited to 'Tests/FindX11')
-rw-r--r-- | Tests/FindX11/Test/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/FindX11/Test/main.c | 69 |
2 files changed, 75 insertions, 0 deletions
diff --git a/Tests/FindX11/Test/CMakeLists.txt b/Tests/FindX11/Test/CMakeLists.txt index b2adfb2..5b304d9 100644 --- a/Tests/FindX11/Test/CMakeLists.txt +++ b/Tests/FindX11/Test/CMakeLists.txt @@ -29,9 +29,12 @@ test_x11_component(x11_components SM) set(X11_X11_FOUND ${X11_FOUND}) test_x11_component(x11_components X11) test_x11_component(x11_components Xau) +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_util) +test_x11_component(x11_components xcb_xfixes) test_x11_component(x11_components xcb_xkb) test_x11_component(x11_components Xcomposite) test_x11_component(x11_components Xdamage) @@ -67,9 +70,12 @@ target_link_libraries(test_var PRIVATE ${X11_LIBRARIES}) # Not included in X11_LIBRARIES. foreach(lib Xau + Xaw xcb X11_xcb xcb_icccm + xcb_util + xcb_xfixes Xcomposite Xdamage Xdmcp diff --git a/Tests/FindX11/Test/main.c b/Tests/FindX11/Test/main.c index c8144e0..b44ae28 100644 --- a/Tests/FindX11/Test/main.c +++ b/Tests/FindX11/Test/main.c @@ -308,6 +308,62 @@ static int test_Xv(void) } #endif +#ifdef HAVE_X11_Xaw +# include <X11/Intrinsic.h> +# include <X11/Xaw/Box.h> + +static void test_Xaw(void) +{ + XrmOptionDescRec opt_table[] = { { NULL } }; + + Widget toplevel; + toplevel = + XtInitialize("test", "test", opt_table, XtNumber(opt_table), NULL, NULL); + Widget box = + XtCreateManagedWidget("testbox", boxWidgetClass, toplevel, NULL, 0); + return; +} + +#endif + +#ifdef HAVE_xcb +# include <xcb/xcb.h> + +static void test_xcb(void) +{ + int screen_nbr; + xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr); + xcb_disconnect(connection); +} + +# ifdef HAVE_xcb_util +# include <xcb/xcb_aux.h> + +static void test_xcb_util(void) +{ + int screen_nbr; + xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr); + xcb_screen_t* screen = xcb_aux_get_screen(connection, screen_nbr); + xcb_disconnect(connection); +} + +# endif + +# ifdef HAVE_xcb_xfixes +# include <xcb/xcb_xfixes.h> + +static void test_xcb_xfixes(void) +{ + int screen_nbr; + xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr); + xcb_xfixes_query_version(connection, 1, 0); + xcb_disconnect(connection); +} + +# endif + +#endif + #include <stddef.h> int main(int argc, char* argv[]) @@ -392,6 +448,19 @@ int main(int argc, char* argv[]) #ifdef HAVE_X11_Xv test_Xv, #endif +#ifdef HAVE_X11_Xaw + test_Xaw, +#endif +#ifdef HAVE_xcb + test_xcb, +#endif +#ifdef HAVE_xcb_util + test_xcb_util, +#endif +#ifdef HAVE_xcb_xfixes + test_xcb_xfixes, +#endif + NULL, }; |