This removes most references to GLU, replaces the legacy CMake cache variables for OpenGL with the modern namespaced target and switches to $() for command substitution. Fixes #1580.