ValveSoftware/vogl — pull request #80 by rib (2014-06-04 01:18:31+00:00)
Title: cmake: handle libm, libGL, libGLU and libSDL2 checks consistently

This adds require_{m,gl,glu} functions to build_options.cmake;
consistent with the require_sdl2 function. These are now used to check
dependencies for glxspheres and vogltest.

Except for require_m, all of these functions use cmake's built in
find_path and find_library functions, passing them pkg-config data in as
'HINTS' which, as far as I can tell, seems to be the recommended pattern
for using pkg-config with cmake.

Notably this now means we use pkg-config to look for libGL and libGLU so
developers can optionally manage which specific libraries they build
against using standard pkg-config environment variables on Linux. It's
now also possible to explicitly override the library and include paths
for these as cached cmake variables.

I've at least tested this patch building 32 bit and 64 bit vogl on my multilib Arch Linux machine where I'm using pkg-config in both cases to point the build at some manually built debug binaries for mesa and sdl2. I've tried to make sure the MSVC paths essentially work as they did before but haven't been able to test them.