title: Using cmake for a project with sub/external projects/dependencies
body: <p>I am actually imroving my c++ skills with a project that uses <a href="http://pocoproject.org/" rel="nofollow" title="pocoproject">PocoProject</a> as a framework for supplying a simple rest webserver and json parsing as well as a mongodb driver.</p>
  
  <p>I am compiling my project with cmake/make</p>
  
  <p>my directory structure is:</p>
  
  <pre><code>root
   - pocoproject
   - helloworld.cpp
   - CMakeLists.txt
  </code></pre>
  
  <p>To test cmake, I have a simple cpp file (taken from the poco examples) that starts a http-server. the includes are the following:</p>
  
  <pre><code>#include "Poco/Net/HTTPServer.h"
  #include "Poco/Net/HTTPRequestHandler.h"
  ...
  #include "Poco/Util/HelpFormatter.h"
  #include &lt;iostream&gt;
  </code></pre>
  
  <p>My CMakeLists.txt look like:</p>
  
  <pre><code>cmake_minimum_required (VERSION 2.6)
  project (Hello)
  add_executable(Hello helloworld.cpp)
  </code></pre>
  
  <h2>Question:</h2>
  
  <p>How do I add the needed libraries from pocoproject to to my executable? How do I reference the headers correctly?</p>