Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-12-14 16:48:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-12-14 16:48:05 +0300
commit0658d047a94a86060f039790898a80a7adb0dcd9 (patch)
treeb74404c3d04638bf157acb013b26f29a0d90d1fa /CMakeLists.txt
parentf0a481eebdfea215f4beac0e4b1cbc5118524a43 (diff)
CMake: Fixes for OpenGL library preferences
Prefer legacy OpenGL library, for the compatibility and portability reasons. Also use proper OpenGL libraries to be linked against, so we can change preference to GLVND.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1912b8f6a34..02a35c1cd4c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,13 @@ endif()
cmake_minimum_required(VERSION 3.5)
+# Prever LEGACY OpenGL to eb compatible with all the existing releases and
+# platforms which don't hare GLVND yet. Only do it if preference was not set
+# externally.
+if(NOT DEFINED OpenGL_GL_PREFERENCE)
+ set(OpenGL_GL_PREFERENCE "LEGACY")
+endif()
+
if(NOT EXECUTABLE_OUTPUT_PATH)
set(FIRST_RUN TRUE)
else()
@@ -1042,7 +1049,7 @@ if(WITH_SYSTEM_GLES)
endif()
if(WITH_GL_PROFILE_COMPAT OR WITH_GL_PROFILE_CORE)
- list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_gl_LIBRARY}")
+ list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_LIBRARIES}")
elseif(WITH_GL_PROFILE_ES20)
if(WITH_SYSTEM_GLES)