mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-28 03:38:43 -06:00
Merge topic 'FindX11-xcb-util-xfixes'
6d231b494f FindX11: Add xcb_util and xcb_xfixes libraries
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5116
This commit is contained in:
@@ -33,6 +33,8 @@ 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)
|
||||
@@ -72,6 +74,8 @@ foreach(lib
|
||||
xcb
|
||||
X11_xcb
|
||||
xcb_icccm
|
||||
xcb_util
|
||||
xcb_xfixes
|
||||
Xcomposite
|
||||
Xdamage
|
||||
Xdmcp
|
||||
|
||||
@@ -326,6 +326,44 @@ static void test_Xaw(void)
|
||||
|
||||
#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[])
|
||||
@@ -413,6 +451,16 @@ int main(int argc, char* argv[])
|
||||
#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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user