From e12b94c98928dafa88bced823c001122928c6198 Mon Sep 17 00:00:00 2001 From: Jonathan De Wachter Date: Thu, 26 Dec 2013 15:37:54 +0100 Subject: [PATCH] Xrandr was missing in the list of external libraries on Linux --- src/SFML/Window/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/SFML/Window/CMakeLists.txt b/src/SFML/Window/CMakeLists.txt index 29555bb06..ed99a289c 100644 --- a/src/SFML/Window/CMakeLists.txt +++ b/src/SFML/Window/CMakeLists.txt @@ -162,8 +162,15 @@ elseif(SFML_OS_ANDROID) endif() # find external libraries +if(SFML_OS_LINUX OR SFML_OS_FREEBSD) + find_package(X11 REQUIRED) + if(NOT X11_Xrandr_FOUND) + message(FATAL_ERROR "Xrandr library not found") + endif() + include_directories(${X11_INCLUDE_DIR}) +endif() if(NOT SFML_OPENGL_ES) - find_package(OpenGL REQUIRED) + find_package(OpenGL REQUIRED) include_directories(${OPENGL_INCLUDE_DIR}) if(SFML_OS_LINUX OR SFML_OS_FREEBSD) find_package(X11 REQUIRED)