title: cmake: Include directories root?
body: <p>I'm trying to set up cmake for a project I'm working on, but I have a problem which I can't resolve currently. My project has the following folder structure:</p>
  
  <pre><code>MotorEngine (root dir)
  | CMakeLists.txt
  | ThirdParty
  |-| SDL2
  |-|-| include (contains all header files for SDL2)
  |-|-| lib
  |-|-|-| x64
  |-|-|-|-| SDL2.lib (the library file I need to link with)
  | Source
  |-| CMakeLists.txt
  |-| main.cpp
  </code></pre>
  
  <p>The root CMakeLists.txt file:</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.6)
  project(MotorEngine)
  
  # Set an output directory for our binaries
  set(BIN_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Binaries)
  
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Binaries)
  set(THIRDPARTY_PATH ${CMAKE_CURRENT_SOURCE_DIR}/ThirdParty)
  
  # Include SDL2
  include_directories(${THIRDPARTY_PATH}/SDL2/include)
  
  # Add the engine + third party subdirectory
  add_subdirectory(Source)
  </code></pre>
  
  <p>The Source's CMakeLists.txt:</p>
  
  <pre><code>project(MotorEngine)
  add_executable(MotorEngine main.cpp)
  target_link_libraries(MotorEngine ${THIRDPARTY_PATH}/SDL2/lib/x64/SDL2.lib)
  </code></pre>
  
  <p>Now, I want to achieve the following, in the main.cpp I want to write</p>
  
  <pre><code>#include "SDL2/include/SDL2.h"
  </code></pre>
  
  <p>But currently I have to write</p>
  
  <pre><code>#include "SDL2.h"
  </code></pre>
  
  <p>Since there will be files with the same name later on, I need to distinguish them in their folders. So the easiest would be to add the "ThirdParty" folder as a root so I can use #include relative to that then, but doing</p>
  
  <pre><code>include_directories(${THIRDPARTY_PATH})
  </code></pre>
  
  <p>does not work. Any ideas? Thank you!</p>