From 1de6649a292cb53ba2eff9912be28009ed2b1b71 Mon Sep 17 00:00:00 2001
From: Stefan Bienert <stefan.bienert@unibas.ch>
Date: Mon, 17 Feb 2020 13:19:48 +0100
Subject: [PATCH] SCHWED-4612: Set OpenGL GL preferences, new Python module
 name for sip in check if sip is installed.

---
 CMakeLists.txt | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f49d1ba83..e42ceeb00 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,7 +31,9 @@ option(PROFILE "whether to compile with profiling support"
 option(ENABLE_GUI "whether the graphical user interface should be enabled"
        ON)
 option(ENABLE_GFX "whether graphics support should be enabled"
-      ON)
+       ON)
+option(ENABLE_GFX "whether to use the OpenGL Legacy GL implementation"
+       OFF)
 option(ENABLE_IMG "whether the image processing module should be compiled"
        ON)
 option(ENABLE_INFO "whether openstructure should be compiled with support for the info library"
@@ -221,6 +223,11 @@ else()
   endif()
 endif()
 if (ENABLE_GFX)
+  if (OPENGLPREFERENCE_LEGACY)
+    set(OpenGL_GL_PREFERENCE LEGACY)
+  else()
+    set(OpenGL_GL_PREFERENCE GLVND)
+  endif(OPENGLPREFERENCE_LEGACY)
   find_package(OpenGL REQUIRED)
 endif()
 
-- 
GitLab