title: CMake file tree
body: <p>I'm new to CMake and I'm trying to specify the following file tree:</p>
  <pre><code>|-- CMakeLists.txt
  \-- src
      |-- main.cpp
      \-- graphics
          |-- context.h
          \-- private
              \-- context.c
  </code></pre>
  <p>And I'm really confused about all these <code>ADD_SUBDIRECTORY()</code>, <code>ADD_LIBRARIES()</code>, <code>TARGET_INCLUDE_DIRECTORIES()</code>, <code>TARGET_LINK_LIBRARIES()</code>, etc.</p>
  <p>How would you describe that file tree to CMake?</p>
  <p>Right now my CMakeLists.txt looks like this:</p>
  <pre><code>CMAKE_MINIMUM_REQUIRED(VERSION 3.7 FATAL_ERROR)
  
  SET(CMAKE_C_STANDARD 99)
  SET(CMAKE_CXX_STANDARD 11)
  
  SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  
  PROJECT(Project VERSION 1.0.0)
  
  # File tree stuff &lt;&lt;&lt;
  
  # GLFW
  SET(GLFW_BUILD_DOCS OFF CACHE BOOL &quot;&quot; FORCE)
  SET(GLFW_BUILD_TESTS OFF CACHE BOOL &quot;&quot; FORCE)
  SET(GLFW_BUILD_EXAMPLES OFF CACHE BOOL &quot;&quot; FORCE)
  
  ADD_SUBDIRECTORY(dependencies/glfw)
  TARGET_LINK_LIBRARIES(${PROJECT_NAME} glfw)
  
  # Vulkan
  FIND_PACKAGE(Vulkan REQUIRED FATAL_ERROR)
  TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PRIVATE ${Vulkan_INCLUDE_DIRS})
  TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Vulkan_LIBRARIES})
  </code></pre>