Move the XTest check to cmake
Where the ifdef was checked, the alternative was a compiler error. We can shortcut that process and just fail in cmake where the header is not found.
This commit is contained in:
parent
38390f9b88
commit
f3eb89121d
|
@ -200,6 +200,10 @@ if (UNIX)
|
|||
set (HAVE_DPMS_PROTOTYPES 1)
|
||||
endif()
|
||||
|
||||
if (NOT HAVE_X11_EXTENSIONS_XTEST_H)
|
||||
message (FATAL_ERROR "Missing header: X11/extensions/XTest.h")
|
||||
endif()
|
||||
|
||||
if (NOT HAVE_X11_XKBLIB_H)
|
||||
message (FATAL_ERROR "Missing header: " ${XKBlib})
|
||||
endif()
|
||||
|
|
|
@ -115,9 +115,6 @@
|
|||
/* Define to 1 if you have the <X11/extensions/XKBstr.h> header file. */
|
||||
#cmakedefine HAVE_X11_EXTENSIONS_XKBSTR_H ${HAVE_X11_EXTENSIONS_XKBSTR_H}
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/XTest.h> header file. */
|
||||
#cmakedefine HAVE_X11_EXTENSIONS_XTEST_H ${HAVE_X11_EXTENSIONS_XTEST_H}
|
||||
|
||||
/* Define to 1 if you have the <X11/XKBlib.h> header file. */
|
||||
#cmakedefine HAVE_X11_XKBLIB_H ${HAVE_X11_XKBLIB_H}
|
||||
|
||||
|
|
|
@ -13,11 +13,7 @@
|
|||
# include <X11/extensions/dpms.h>
|
||||
}
|
||||
#endif
|
||||
#if HAVE_X11_EXTENSIONS_XTEST_H
|
||||
# include <X11/extensions/XTest.h>
|
||||
#else
|
||||
# error The XTest extension is required to build barrier
|
||||
#endif
|
||||
#include <X11/extensions/XTest.h>
|
||||
#if HAVE_X11_EXTENSIONS_XINERAMA_H
|
||||
// Xinerama.h may lack extern "C" for inclusion by C++
|
||||
extern "C" {
|
||||
|
|
|
@ -24,11 +24,7 @@
|
|||
#include "XWindowsImpl.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#if HAVE_X11_EXTENSIONS_XTEST_H
|
||||
# include <X11/extensions/XTest.h>
|
||||
#else
|
||||
# error The XTest extension is required to build barrier
|
||||
#endif
|
||||
#include <X11/extensions/XTest.h>
|
||||
#if HAVE_XKB_EXTENSION
|
||||
# include <X11/extensions/XKBstr.h>
|
||||
#endif
|
||||
|
|
|
@ -26,11 +26,7 @@
|
|||
#include "base/TMethodEventJob.h"
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#if HAVE_X11_EXTENSIONS_XTEST_H
|
||||
# include <X11/extensions/XTest.h>
|
||||
#else
|
||||
# error The XTest extension is required to build barrier
|
||||
#endif
|
||||
#include <X11/extensions/XTest.h>
|
||||
#if HAVE_X11_EXTENSIONS_DPMS_H
|
||||
extern "C" {
|
||||
# include <X11/Xmd.h>
|
||||
|
|
Loading…
Reference in New Issue