From 0bcb4c8a2abccc4b6bd7dd95dda6561c4e077044 Mon Sep 17 00:00:00 2001 From: David G Yu Date: Thu, 4 Jun 2015 12:51:52 -0700 Subject: [PATCH] Added Xinerama as a link dependency for GLFW This is a recently introduced dependency in GLFW 3.1.x Since Xinerama is widely supported, simply adding this as a required dependency for now. If this turns out to be a problem then we can make this dependency optional when using older versions of GLFW. --- cmake/FindGLFW.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/FindGLFW.cmake b/cmake/FindGLFW.cmake index 43be0a4f..e8152bf7 100644 --- a/cmake/FindGLFW.cmake +++ b/cmake/FindGLFW.cmake @@ -154,7 +154,11 @@ else () message(FATAL_ERROR "Xcursor library not found - required for GLFW") endif() - list(APPEND GLFW_x11_LIBRARY "${X11_Xrandr_LIB}" "${X11_Xxf86vm_LIB}" "${X11_Xcursor_LIB}" "${CMAKE_THREAD_LIBS_INIT}" -lrt -lXi) + if(NOT X11_Xinerama_FOUND) + message(FATAL_ERROR "Xinerama library not found - required for GLFW") + endif() + + list(APPEND GLFW_x11_LIBRARY "${X11_Xrandr_LIB}" "${X11_Xxf86vm_LIB}" "${X11_Xcursor_LIB}" "${X11_Xinerama_LIB}" "${CMAKE_THREAD_LIBS_INIT}" -lrt -lXi) find_library( GLFW_glfw_LIBRARY NAMES