title: Include Pistache in C++ project
body: <p>Apologies for the fact this is a very noob question but I am fairly new to C++.</p>
  <p>I'm building a RESTful service with <a href="http://pistache.io/" rel="noreferrer">pistache</a>. I have checked it out and got the examples running within the project itself but am now trying to import/include the framework to use in my own project.</p>
  <p>My folder structure is as follows:</p>
  <pre><code>rest_api
     |
     +--- build
     +--- include
            |
            +--- pistache
     +--- src
            |
            +--- main.cpp
     +--- tests
  </code></pre>
  <p>The <code>pistache</code> directory holds <strong>all</strong> of the <a href="https://github.com/oktal/pistache" rel="noreferrer">pistache source</a> code compiled.
  <em>(I am unsure here if I need the entirety of the project or just the header files)</em></p>
  <p>I have attempted to follow the <a href="https://github.com/oktal/pistache#example" rel="noreferrer">example</a> and the <a href="http://pistache.io/quickstart" rel="noreferrer">quickstart</a> guide but have had no look.</p>
  <p>My <strong>CMakeLists.txt</strong> is barebones currently looking like this:</p>
  <pre><code>cmake_minimum_required(VERSION 3.5.1)
  project(rest_api)
  
  set(CMAKE_CXX_STANDARD 14)
  set(PISTACHE_DIR &quot;./include/pistache&quot;)
  
  include_directories (${PISTACHE_DIR}/include)
  
  add_executable(${PROJECT_NAME} src/main.cpp)
  </code></pre>
  <p>My <strong>main.cpp</strong> is a direct copy of their <a href="https://github.com/oktal/pistache/blob/master/examples/hello_server.cc" rel="noreferrer">example hello_server.cc</a>.</p>
  <p>When I try and <code>make</code> my project, I am returned with the exceptions <em>(a snapshot of)</em>:</p>
  <pre><code>main.cpp:(.text+0x143): undefined reference to `Pistache::Port::Port(unsigned short)'
  main.cpp:(.text+0x148): undefined reference to `Pistache::Ipv4::any()'
  main.cpp:(.text+0x162): undefined reference to `Pistache::Address::Address(Pistache::Ipv4, Pistache::Port)'
  main.cpp:(.text+0x171): undefined reference to `Pistache::Http::Endpoint::options()'
  main.cpp:(.text+0x185): undefined reference to `Pistache::Http::Endpoint::Options::threads(int)'
  main.cpp:(.text+0x1c9): undefined reference to `Pistache::Http::Endpoint::Endpoint(Pistache::Address const&amp;)'
  main.cpp:(.text+0x1e2): undefined reference to `Pistache::Http::Endpoint::init(Pistache::Http::Endpoint::Options const&amp;)'
  main.cpp:(.text+0x223): undefined reference to `Pistache::Http::Endpoint::setHandler(std::shared_ptr&lt;Pistache::Http::Handler&gt; const&amp;)'
  </code></pre>
  <p>I have looked at questions such as <a href="https://stackoverflow.com/questions/5293021/undefined-reference-to#5293199">this</a> but does not help me.</p>
  <p>My questions are:</p>
  <ol>
  <li>Do I need the entirety of the <em>Pistache</em> source code or just the headers?</li>
  <li>What is wrong in my <em>CMakeLists.txt</em> that causes these errors?</li>
  </ol>
  <p>Apologies if this is seen as a duplicate but have not been able to find the right answers I need.</p>
  <p>Thank you!</p>