mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 14:45:46 +00:00
Made XInput2 optional at compile-time.
This is required for RHEL 5, CentOS 5 and Cygwin-X. Fixes #314.
This commit is contained in:
+10
-10
@@ -273,19 +273,19 @@ if (_GLFW_X11)
|
||||
list(APPEND glfw_PKG_DEPS "xinerama")
|
||||
|
||||
# Check for XInput (high-resolution cursor motion)
|
||||
if (NOT X11_Xinput_FOUND)
|
||||
message(FATAL_ERROR "The XInput library and headers were not found")
|
||||
endif()
|
||||
if (X11_Xinput_FOUND)
|
||||
list(APPEND glfw_INCLUDE_DIRS "${X11_Xinput_INCLUDE_PATH}")
|
||||
list(APPEND glfw_PKG_DEPS "xi")
|
||||
|
||||
list(APPEND glfw_INCLUDE_DIRS "${X11_Xinput_INCLUDE_PATH}")
|
||||
if (X11_Xinput_LIB)
|
||||
list(APPEND glfw_LIBRARIES "${X11_Xinput_LIB}")
|
||||
else()
|
||||
# Backwards compatibility (bug in CMake 2.8.7)
|
||||
list(APPEND glfw_LIBRARIES Xi)
|
||||
endif()
|
||||
|
||||
if (X11_Xinput_LIB)
|
||||
list(APPEND glfw_LIBRARIES "${X11_Xinput_LIB}")
|
||||
else()
|
||||
# Backwards compatibility (bug in CMake 2.8.7)
|
||||
list(APPEND glfw_LIBRARIES Xi)
|
||||
set(_GLFW_HAS_XINPUT TRUE)
|
||||
endif()
|
||||
list(APPEND glfw_PKG_DEPS "xi")
|
||||
|
||||
# Check for Xf86VidMode (fallback gamma control)
|
||||
if (NOT X11_xf86vmode_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user