GlutSTBMiniAudio-Template
Changing the Project Name
In the CMakeLists.txt file, find line 11 (project(GSM_TEMPLATE LANGUAGES C CXX)) and replace "GSM_TEMPLATE" with whatever you'd like
Setup
For Windows
-
Install Visual Studio
Make sure you have installed Visual Studio, not Visual Studio Code, you need the MSVC Compiler installed which is bundled and accessible with Standard Visual Studio -
Once installed open Visual Studio and select "Open a folder", then find and select the folder of this project

-
When the project opens, CMake should immedately start installing thirdparty dependencies. Please make sure you see "CMake generation finished" before continuing.

-
Finally select the correct Target from the Target list, to the right of the run button.

-
Finally press the run button and the application should just work
For MacOS
-
There are many different ways to use CMake on Mac or Linux. Visual Studio works great, but its a Command Line Interface application so it's easy to use anywhere.
However, for this guide, install Visual Studio Code and Brew. Brew is like apt for MacOS, if you don't want to install it, find some way to install CMake. -
Open this project in Visual Studio Code.
-
You may need to reload the project, so do that with CMD+Shift+P, search for "Reload Window", and Press enter
-
When the project opens, it should immediately start downloading the libraries that this project needs. Please wait until it completes or you see "CMake generation finished" in the console.
-
Once CMake has finished configuring, press Shift+F5 (You may also need to press fn depending on how your mac is setup), and the application will run.
For Linux (Debian/Ubuntu)
The following packages are needed in order for the included libraries to function: cmake, build-essential, libgl1-mesa-dev, libglu1-mesa-dev, freeglut3-dev, libx11-dev, libxcursor-dev, libxtst-dev, libxft-dev, libxmu-dev, libxi-dev
Heres an easy one-line install script
sudo apt install cmake build-essential libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libx11-dev libxcursor-dev libxtst-dev libxft-dev libxmu-dev libxi-dev -y
After this point, follow the same instructions for MacOS, or use the CLI Interface below.
NOTE - For some reason, unix needs to use #include <GL/freeglut.h>, it will thow a error if #include <gl/freeglut.h>. Notice the capitalization
CLI
To compile the project with normal cmake, it's stupid easy.
cmake .; make;
The binary should be in the root of the project after it is installed so run
./GSM_TEMPLATE



