add opengl detection to cmake