title: CMake add library with subdirectories
body: <p><strong>TL;DR</strong></p>
  
  <p>Using CMake, how can I include subdirectories into a library such that they can be included without referencing the directories they reside? </p>
  
  <p><strong>End TL;DR</strong></p>
  
  <p>In attempt to be brief and speak in higher level ideas of what and how, I have removed everything that I consider to be unnecessary details. I will make edits if need be. As such, this is a brief synopsis of my project structure. </p>
  
  <pre><code>ParentDir
  --src
  ----source.cpp
  ----source.h
  ----entities_dir
  ------entity.cpp
  ------entity.h
  ------CMakeLists.txt
  ----CMakeLists.txt
  --CMakeLists.txt
  --main.cpp
  </code></pre>
  
  <p>as it currently stands, I have a library defined by the CMakeLists in the src directory. As such, I can include src files in main by #include  as apposed to #include "src/file.h" I would like to be able to do the same for my headers that exist within the subdirectories of src. </p>
  
  <p><strong>CMakeLists.txt</strong></p>
  
  <pre><code>cmake_minimum_required(VERSION 3.6)
  project(Project) 
  
  add_executable(Project ${SOURCE_FILES} main.cpp)
  include_directories(src)
  add_subdirectory(src)
  target_link_libraries(Project Library) # Engine Libraries
  </code></pre>
  
  <p><strong>src/CMakeLists.txt</strong></p>
  
  <pre><code>file(GLOB SOURCE_FILES *.cpp)
  file(GLOB HEADER_FILES *.h)
  
  add_library(Library STATIC ${SOURCE_FILES} ${HEADER_FILES})
  </code></pre>
  
  <p><strong>main.cpp</strong></p>
  
  <pre><code>#include &lt;source.h&gt; // this works
  #include &lt;entity.h&gt; // this does not work but I want it to
  #include &lt;entities/entity.h&gt; // this works but I don't want this
  int main() {}
  </code></pre>
  
  <p>I am not sure how to do this exactly. I have tried to GLOB_RECURSE, add_subdirectory(entities), etc. I have also tried creating a library called Entities inside the src/entities/CMakeLists.txt and linking that with link_libraries. None of these have been successful. What is the proper way to accomplish this, because I think I am probably approaching this completely wrong. </p>