From 01925fd6a789e3bdcf67a1960f28d83799b1458c Mon Sep 17 00:00:00 2001
From: Maciej Suminski <maciej.suminski@cern.ch>
Date: Fri, 17 Aug 2018 10:00:17 +0200
Subject: [PATCH] Changed the OpenGL CMake preference to LEGACY

Certain distribution does not handle GLVND well, as the result the
accelerated canvas is not enabled. For the time being it is better to
keep using the legacy preference.

Thanks to Aurelio Lucchesi for investigating the cause.

Fixes: lp:1781581
* https://bugs.launchpad.net/kicad/+bug/1781581
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e924359bb1..d6e7358209 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -598,7 +598,7 @@ endif()
 #
 # Find OpenGL library, required
 #
-set( OpenGL_GL_PREFERENCE "GLVND" )     # CMake 3.11+ setting; see 'cmake --help-policy CMP0072'
+set( OpenGL_GL_PREFERENCE "LEGACY" )     # CMake 3.11+ setting; see 'cmake --help-policy CMP0072'
 find_package( OpenGL REQUIRED )
 
 #