Multi-touch: fix CMake: Xi and XInput2.h detection wasn't ported from autoconf, effectively disabling multi-touch
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1315 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
4f3b46e046
commit
fae6135480
@ -207,6 +207,7 @@ IF(CMAKE_COMPILER_IS_GNUCC)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
|
||||||
|
INCLUDE(CheckIncludeFiles)
|
||||||
IF(UNIX AND NOT ANDROID)
|
IF(UNIX AND NOT ANDROID)
|
||||||
FIND_PACKAGE(X11 REQUIRED)
|
FIND_PACKAGE(X11 REQUIRED)
|
||||||
LIST(APPEND LIBS ${X11_LIBRARIES})
|
LIST(APPEND LIBS ${X11_LIBRARIES})
|
||||||
@ -222,6 +223,10 @@ IF(UNIX AND NOT ANDROID)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
LIST(APPEND LIBS ${X11_Xxf86vm_LIB})
|
LIST(APPEND LIBS ${X11_Xxf86vm_LIB})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
IF(X11_Xinput_FOUND)
|
||||||
|
CHECK_INCLUDE_FILES("${X11_Xinput_INCLUDE_PATH}/X11/extensions/XInput2.h" HAVE_X11_EXTENSIONS_XINPUT2_H)
|
||||||
|
LIST(APPEND LIBS ${X11_Xinput_LIB})
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(ANDROID)
|
IF(ANDROID)
|
||||||
# -landroid for ANativeWindow
|
# -landroid for ANativeWindow
|
||||||
@ -229,7 +234,6 @@ IF(ANDROID)
|
|||||||
LIST(APPEND LIBS android log)
|
LIST(APPEND LIBS android log)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
INCLUDE(CheckIncludeFiles)
|
|
||||||
INCLUDE(CheckFunctionExists)
|
INCLUDE(CheckFunctionExists)
|
||||||
INCLUDE(CheckTypeSize)
|
INCLUDE(CheckTypeSize)
|
||||||
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
|
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#cmakedefine HAVE_X11_EXTENSIONS_XF86VMODE_H
|
#cmakedefine HAVE_X11_EXTENSIONS_XF86VMODE_H
|
||||||
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H
|
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H
|
||||||
|
#cmakedefine HAVE_X11_EXTENSIONS_XINPUT2_H
|
||||||
#cmakedefine HAVE_SYS_TYPES_H
|
#cmakedefine HAVE_SYS_TYPES_H
|
||||||
#cmakedefine HAVE_UNISTD_H
|
#cmakedefine HAVE_UNISTD_H
|
||||||
#cmakedefine HAVE_SYS_TIME_H
|
#cmakedefine HAVE_SYS_TIME_H
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "../fg_internal.h"
|
#include "../fg_internal.h"
|
||||||
|
|
||||||
#if HAVE_X11_EXTENSIONS_XINPUT2_H
|
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
Reference in New Issue
Block a user