Page MenuHome

Fix build error due to missing definitions
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Tue, May 19, 12:42 PM.

Details

Summary

Without this I was getting /home/jacques/blender/blender/extern/glew/include/GL/glew.h:1205:14: fatal error: GL/glu.h: No such file or directory
because GLEW_NO_GLU was not defined.

No idea if this is the right fix. It worked for me and seems reasonable.

Diff Detail

Repository
rB Blender

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Tue, May 19, 12:42 PM
Jacques Lucke (JacquesLucke) created this revision.
intern/opensubdiv/CMakeLists.txt
107–108

Think GLEW_STATIC should be removed and specified via GL_DEFINITIONS.

From blender.chat, because you did not respond there:

It seems like GLEW_STATIC is already part of GL_DEFINITIONS sometimes. Is this related to the fix? Maybe you can do the fix you have in mind, instead of me trying to guess what you mean? I'm not entirely sure what I'm doing there.

It seems like GLEW_STATIC is already part of GL_DEFINITIONS sometimes.

GLEW_STATIC should be part of GL_DEFINITIONS whenever it is required. If that's not the case then this is to be addressed.

Is this related to the fix?

It is related. You are using GL_DEFINITIONS which is supposed to be the source of truth of GL related definitions, and wrong definitions were the root source of the issue you're solving.
With the current state of the patch you are always forcing GLEW_STATIC, which might work in your specific case but is wrong from the design point of view.

Maybe you can do the fix you have in mind.

Just remove add_definitions(-DGLEW_STATIC) from OpenSubdiv's CMakeLists.txt, and keep your newly added add_definitions(${GL_DEFINITIONS}).
This should be the correct way to go.

  • remove GLEW_STATIC definition
This revision is now accepted and ready to land.Tue, May 19, 3:50 PM