title: How library linking and header inclusion works with CMAKE
body: <p>I am newbie to the CMAKE. please forgive me if you found my question silly.</p>
  <p>I have following scenario in my project.</p>
  <p>I have to use library <code>libraryone</code> in my <code>librarytwo</code></p>
  <p>may CMakeLists.txt for librarytwo looks like</p>
  <pre><code>cmake_minimum_required(VERSION 3.5)
  find_package(libraryone REQUIRED)
  add_library(librarytwo STATIC librarytwo.cpp)
  target_link_libraries(librarytwo PUBLIC lib1::libraryone)
  </code></pre>
  <p>And my librarytwo.h and librarytwo.cpp looks like</p>
  <p>librarytwo.h</p>
  <pre><code>#include &lt;src/lib1/libraryone.h&gt;
  --------
  -------
  </code></pre>
  <p>librarytwo.cpp</p>
  <pre><code>#include &lt;librarytwo.h&gt;
  ---------
  --------
  </code></pre>
  <p>My libray two getting build properly.</p>
  <p>Now I want to use librarytwo in librarythree</p>
  <p>So my CMakeList.txt for librarythree looks like</p>
  <pre><code>cmake_minimum_required(VERSION 3.5)
  add_library(librarythree STATIC librarythree.cpp)
  target_include_directories(librarythree PRIVATE ${CMAKE_SOURECE_DIR}/src/lib2}
  target_link_libraries(librarythree PRIVATE librarytwo)
  </code></pre>
  <p>my librarythree.cpp and libraythree.h looks like</p>
  <p>librarythree.h</p>
  <pre><code>#include &lt;src/lib2/librarytwo.h&gt;
  --------
  -------
  </code></pre>
  <p>librarythree.cpp</p>
  <pre><code>#include &lt;librarythree.h&gt;
  ---------
  --------
  </code></pre>
  <p>But while building librarythree, I am getting error in librarythree.h saying <code>libraryone.h : No such file or directory</code></p>
  <p>So, it was working for librarytwo.h and I have linked librarytwo to librarythree.
  So what I am missing ? help appreciated.</p>