GSoC/GCI Archive
Google Code-in 2012 BRL-CAD

Fix CMake build system auto-disabling of GLEW

completed by: Cezar

mentors: Sean

BRL-CAD uses the CMake build system which generates project files for a variety of environments like Makefiles for *nix and MSVC projects for Windows.  The build system is described with a simple CMake scripting/macro language where we tell it how to build all of BRL-CAD.  When we add an external dependency, like using X11 for windowing, we add checks in this CMake scripting language to detect if X11 is available, find where it's installed, figure out what compiler flags to use, etc.  When it doesn't find it (e.g., on Windows), we auto-disable that feature and tools that require that feature.

One of our optional external dependencies is the GLEW library.  It should not be attempting to build GLEW when X11 isn't available but currently does.

This task is to get GLEW compiling properly so that it properly disables when it cannot be compiled (e.g., when X11 isn't available).

Provide your work as a single patch file with all changes included.  See http://brlcad.org/wiki/Deuces for help getting started.  You may need to manually move one of your system gl/x11 headers in order to properly test this on your own system.