title: How to improve my script and copy program resources on build?
body: <p>So I got into a problem where I needed to use linux for a while instead of windows, and figured linux doesn't have Visual Studio. I then also realized that I made my project Visual Studio only, which I don't want.</p>
  
  <p>So I looked up some CMake tutorials and try'ed creating some examples that could be loaded in both Visual Studio and CodeBlocks. When I got that to work, I went and code a CMake script for my actual program by piecing together what I learned and what I found in tutorials.
  See here:</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.8.9)
  
  add_subdirectory(libraries/glfw)
  
  project (OpenGLEngine3D)
  
  include_directories(libraries/glfw/include)
  include_directories(libraries/glm)
  include_directories(libraries/glad/include)
  include_directories(libraries/whereami/src)
  include_directories(libraries/stb)
  
  file(GLOB SOURCES "src/*.cpp" "src/*.h" "libraries/whereami/src/whereami.c" "libraries/glad/src/glad.c")
  
  add_executable(OpenGLEngine3D  ${SOURCES})
  target_link_libraries(OpenGLEngine3D glfw)
  </code></pre>
  
  <p>Its dirty(I think) but it works.
  So now my <strong>first</strong> question is, how to improve my CMake script? What is redundant or done in a poor way?</p>
  
  <p>Now my program also requires some resources(like shaders, textures) which I have stored in a directory along with my CMake script, libraries and c++ files.
  So my <strong>second</strong> question is, how would I tell CMake to the ide/compiler to copy the files in a certain directory to the program build directory(where the compiled binaries are) after compiling?(And have it only do it when the files aren't there ofc.)</p>
  
  <p>Thanks!</p>