From c4eb150c7eaa11a75b6624dd0cabfe676ea694ad Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 18 Dec 2011 14:30:08 +0100 Subject: [PATCH] Skip XRANDR check if X11 is not found. Our code does not compile when HAVE_XRANDR=1 and HAVE_X11=0. This combination would not normally exist, but on OS X we skip the X11 check so it is possible for X11 to be "not found" even when the OS does support it. On OS X 10.6 this was not a problem because XRANDR is not detected there, but apparently on OS X 10.7 XRANDR is available. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb1f17d2b3..8d9addeb58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,7 +287,9 @@ else() add_definitions(-DHAVE_X11=0) endif() +if(X11_FOUND) check_lib(XRANDR Xrandr) +endif() if(XRANDR_FOUND) add_definitions(-DHAVE_XRANDR=1) else()