From 4ff8095dee25ef506b158cf3c2a338e2820173da Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Fri, 13 Sep 2013 14:41:13 +0200 Subject: [PATCH] Workaround for libXi and CMake 2.8.7. --- CMakeLists.txt | 8 +++++++- README.md | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2a61ab1..7c9b2c2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,7 +211,13 @@ if (_GLFW_X11) endif() list(APPEND glfw_INCLUDE_DIRS ${X11_Xinput_INCLUDE_PATH}) - list(APPEND glfw_LIBRARIES ${X11_Xinput_LIB}) + + 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() set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} xi") # Check for Xf86VidMode (fallback gamma control) diff --git a/README.md b/README.md index 511f73a5..c9d60fcc 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,7 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/). - [Win32] Bugfix: `_WIN32_WINNT` was not set to Windows XP or later - [Win32] Bugfix: Legacy MinGW needs `WINVER` and `UNICODE` before `stddef.h` - [X11] Bugfix: Events for mouse buttons 4 and above were not reported + - [X11] Bugfix: CMake 2.8.7 does not set `X11_Xinput_LIB` even when found ## Contact @@ -277,6 +278,7 @@ skills. - Bruce Mitchener - Jeff Molofee - Jon Morton + - Pierre Moulon - Julian Møller - Ozzy - Peoro