title: Linker errors with PCL 1.8.0 project
body: <p>I'm getting some confusing linking errors in my project after a fresh compilation and install of PCL 1.8.0. Some classes are fine (I can read and render a PC) but as soon as I instantiate some others, I get a whack of linker errors. </p>
  
  <p>eg. </p>
  
  <pre><code>#include &lt;pcl/point_types.h&gt;
  #include &lt;pcl/filters/statistical_outlier_removal.h&gt;
  
  int main()
  {
    pcl::StatisticalOutlierRemoval&lt;pcl::PointXYZ&gt; testObject;
  }
  </code></pre>
  
  <p>Fails at linking with about 700 undefined references from within the PCL libraries. In this example most are related to FLANN related classes from libpcl_search.a and libpcl_recognition.a</p>
  
  <pre><code>/usr/local/lib/libpcl_search.a(kdtree.cpp.o):-1: In function `pcl::search::KdTree&lt;pcl::PointXYZ, pcl::KdTreeFLANN&lt;pcl::PointXYZ, flann::L2_Simple&lt;float&gt; &gt; &gt;::setSortedResults(bool)':
  
  /home/Horatio/libs/pcl-pcl-1.8.0/search/include/pcl/search/impl/kdtree.hpp:65: error: undefined reference to `pcl::KdTreeFLANN&lt;pcl::PointXYZ, flann::L2_Simple&lt;float&gt; &gt;::setSortedResults(bool)'
  </code></pre>
  
  <p>CMake output messages seem to indicate that it is finding flann and I didn't have any issues compiling either library. I also tried explicitly calling find_package(flann) in my Cmake with no success.</p>
  
  <pre><code>Checking for module 'flann'
    Found flann, version 1.8.4
  </code></pre>
  
  <p>I also built and ran the PCL unit tests related to the filter class in the example without error.</p>
  
  <p>The only thing I can think that might be relevant is that I built PCl with shared_libs=OFF, and the flann libraries selected by cmake were still shared objects (*.so) despite there being *.a static libraries installed. I couldn't get cmake to properly identify them. </p>
  
  <p>Do I explicitly need to link the shared dependencies of static libraries within a new project? I thought the point of static linking was (in part) to reduce the number of shared dependencies and increase portability? </p>
  
  <p>Any specific help or directions to generally relevant info would be much appreciated!</p>