diff options
author | Kurt Sansom <kayarre@gmail.com> | 2020-07-16 17:48:41 (GMT) |
---|---|---|
committer | Kurt Sansom <kayarre@gmail.com> | 2020-07-16 19:16:24 (GMT) |
commit | fa7157b86ddcfe675c5f8a6750bcbd6095737465 (patch) | |
tree | 26de1e1f4d4d8a786ab5e2fb85371e173813c031 /Tests | |
parent | c7b7547d8da6b9a4225d111440d0cf6c2f55914d (diff) | |
download | CMake-fa7157b86ddcfe675c5f8a6750bcbd6095737465.zip CMake-fa7157b86ddcfe675c5f8a6750bcbd6095737465.tar.gz CMake-fa7157b86ddcfe675c5f8a6750bcbd6095737465.tar.bz2 |
FindX11: Add Xaw libraries
Fixes: #20963
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FindX11/Test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/FindX11/Test/main.c | 21 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Tests/FindX11/Test/CMakeLists.txt b/Tests/FindX11/Test/CMakeLists.txt index b2adfb2..7325b32 100644 --- a/Tests/FindX11/Test/CMakeLists.txt +++ b/Tests/FindX11/Test/CMakeLists.txt @@ -29,6 +29,7 @@ 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) @@ -67,6 +68,7 @@ target_link_libraries(test_var PRIVATE ${X11_LIBRARIES}) # Not included in X11_LIBRARIES. foreach(lib Xau + Xaw xcb X11_xcb xcb_icccm diff --git a/Tests/FindX11/Test/main.c b/Tests/FindX11/Test/main.c index c8144e0..f8c723c 100644 --- a/Tests/FindX11/Test/main.c +++ b/Tests/FindX11/Test/main.c @@ -308,6 +308,24 @@ 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 + #include <stddef.h> int main(int argc, char* argv[]) @@ -392,6 +410,9 @@ int main(int argc, char* argv[]) #ifdef HAVE_X11_Xv test_Xv, #endif +#ifdef HAVE_X11_Xaw + test_Xaw, +#endif NULL, }; |