title: Multiple library CMakeLists.txt
body: <p>We have a project P (<code>C/C++</code> on Linux) consisting of libraries <code>lib1</code>, <code>lib2</code>, <code>lib3</code>.</p>
  
  <ul>
  <li><code>lib1</code> is standalone linked to another system-wide libs</li>
  <li><code>lib2</code> links to <code>lib1</code></li>
  <li><code>lib3</code> links to both <code>lib1</code> and <code>lib2</code></li>
  </ul>
  
  <p>We have a directory P and extra directories for each of our libs (so, <code>P/lib1/</code>, <code>P/lib2/</code>...). Every library has also its own tests.</p>
  
  <p>Questions:</p>
  
  <ul>
  <li>Please, how to organize <code>CMakeLists.txt</code> for this scenario?</li>
  <li>Should we create only one master <code>build</code> directory or one for each lib?</li>
  <li>Can we have an option in <code>CMakeLists.txt</code> for <code>STATIC vs. SHARED</code> linking?</li>
  </ul>