How I was told to set it up was to use file>open in Qt.
Qt is a C++ development toolkit. Qt Creator is the integrated development environment you are confusing with the toolkit. CMake is not a compiler. It is a tool, like make, nmake, or the Qt Creator IDE which reads a project configuration file (in this case CMakeLists.txt) and builds the project(s) defined within it. This may or may not include compiling the C++ source code, which uses a compiler (and that could be gcc or Microsoft's Visual C++ compiler, depending on what you have installed).

If you don't have an environment variable "GLUT_INCLUDE_DIR" defined, or it is pointing to the wrong place, then that will result in your CMake error. It is telling you that CMake can't find the include directories that GLUT_INCLUDE_DIR is pointing to if it is defined at all.

The CMake misconfiguration isn't affecting your source code compilation, because the compiler apparently can find the GLUT include files. This is totally unrelated to anything you've told CMake. These lines:

#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glut.h>
are telling the compiler where to look for your OpenGL and GLUT include files, and your directory layout seems to be appropriate for it to find them. Thus, you can compile your program, but you can't link it because you haven't told the linker where to look for the library files. Possibly there is a GLUT_LIBRARY_DIR or some similar environment variable that needs to be set to point there. That is probably something that needs to be added to your CMakeLists.txt file (and successfully run through CMake).