title: target_include_directories resulting include path
body: <p>Say I have a project that looks like:</p>
  
  <pre><code> Project (dir)
     -- CMakeLists.txt
     -- MyLib (dir)
       |-- CMakeLists.txt
       |-- MyLib.h
       |-- MyLib.cpp
  
     -- MyOtherLib (dir)
       |-- CMakeLists.txt
       |-- MyLib.h (note that this is exactly the same name as in MyLib above)
       |-- MyLib.cpp
  </code></pre>
  
  <p>If in MyLib/CMakeLists.txt I do this:</p>
  
  <pre><code>target_include_directories(MyLib PUBLIC
    $&lt;BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}&gt;
  </code></pre>
  
  <p>Then anything that <code>target_link_libraries</code> to <code>MyLib</code> will have the "correct" include path to do <code>#include "MyLib.h"</code>. However, if another executable <code>MyExecutable</code> depends on both libraries using <code>target_link_libraries(MyExecutable MyLib MyOtherLib)</code> you'd like to be able to instead specify which one is intended with <code>#include "MyLib/MyLib.h"</code> or <code>#include "MyOtherLib/MyLib.h"</code>. The only way I see to do that is to instead use:</p>
  
  <pre><code>target_include_directories(MyLib PUBLIC
    $&lt;BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..&gt;
  </code></pre>
  
  <p>which kind of defeats one of the nice things about <code>target_include_directories</code> in that it really strongly enforces avoiding accidental header dependencies, because you literally can't include things that you aren't explicitly claiming to use.</p>
  
  <p>Is there another way to get this <code>#include "MyLib/MyLib.h"</code> behavior?</p>