Don't link against GLU library
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 3 Jan 2019 16:42:04 +0000 (17:42 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 3 Jan 2019 16:43:07 +0000 (17:43 +0100)
We are core profile now, no need to link against GLU.

This change makes it so Blender binary is not dependent on liGLU.so.
That was a weird thing that Blender was dependent on it, but was not
using any functions from it.

CMakeLists.txt

index 3218bf9..8d8f78a 100644 (file)
@@ -1057,8 +1057,11 @@ if(WITH_GL_PROFILE_ES20)
        endif()
 
 else()
-       list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_LIBRARIES}")
-
+       if(OpenGL_GL_PREFERENCE STREQUAL "LEGACY" AND OPENGL_gl_LIBRARY)
+               list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glx_LIBRARY})
+       else()
+               list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY})
+       endif()
 endif()
 
 if(WITH_GL_EGL)