title: How to create a CMake file to compile all C++ files of a project?
body: <p>I have the following source files:</p>
  
  <pre><code>main.cpp game.cpp TextureManager.cpp GameObject.cpp Map.cpp
  </code></pre>
  
  <p>and each of them (apart from <code>main.cpp</code>) has a header file with the same name:</p>
  
  <pre><code>game.h TextureManager.h GameObject.h Map.h
  </code></pre>
  
  <p>I can now compile my source files through the terminal using the following command:</p>
  
  <pre><code>g++ -std=gnu++11 -o executable main.cpp game.cpp TextureManager.cpp GameObject.cpp Map.cpp -lGL -lSDL2 -lSDL
  </code></pre>
  
  <p>What the make file should look like to compile the aforementioned source files and also incorporating the libraries and the <code>g++ -std=gnu+11</code>?</p>