title: Compile a PCL code example with QtCreator using CMakeLists file
body: <p>I'm trying to compile a <em>PCL</em> example with <em>QtCreator</em>, using a <em>CMakeLists.txt</em> file. The <em>FindPCL.cmake</em> file (got it from here: <a href="http://dev.pointclouds.org/issues/148" rel="nofollow">Last of the attached files</a>)  is in the same directory of the source files.</p>
  
  <p>My <em>CMakeLists.txt</em> file is:</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
  project(pclcmake)
  list(APPEND CMAKE_MODULE_PATH "C:/CMake2.8/bin")
  set(PCL_ROOT "E:/LIBRERIAS/PCL1.5.1")
  set(PCL_DIR "E:/LIBRERIAS/PCL1.5.1/cmake")
  find_package(PCL 1.5.1 REQUIRED COMPONENTS common octree io)
  include_directories(${PCL_INCLUDE_DIRS})
  link_directories(${PCL_LIBRARY_DIRS})
  add_definitions(${PCL_DEFINITIONS})
  add_executable(pcl_cmake main.cpp)
  target_link_libraries(pcl_cmake ${PCL_COMMON_LIBRARIES} ${PCL_OCTREE_LIBRARIES} ${PCL_IO_LIBRARIES})
  </code></pre>
  
  <p>The code I'm trying to compile is this:</p>
  
  <pre><code>#include &lt;pcl/io/pcd_io.h&gt;
  #include &lt;pcl/point_types.h&gt;
  
  #include &lt;iostream&gt;
  
  int main(int argc, char* argv[]) {
    pcl::PointCloud&lt;pcl::PointXYZ&gt;::Ptr cloud (new pcl::PointCloud&lt;pcl::PointXYZ&gt;);
  
    if (pcl::io::loadPCDFile&lt;pcl::PointXYZ&gt; ("test_pcd.pcd", *cloud) == -1) //* load the file
    {
       std::cout &lt;&lt; "Nope\n";
       return (-1);
    }
    std::cout &lt;&lt; "Loaded " &lt;&lt; cloud-&gt;width * cloud-&gt;height &lt;&lt; " data points from test_pcd.pcd with the following fields: " &lt;&lt; std::endl;
    for (size_t i = 0; i &lt; cloud-&gt;points.size (); ++i)
       std::cout &lt;&lt; "    " &lt;&lt; cloud-&gt;points[i].x &lt;&lt; " "    &lt;&lt; cloud-&gt;points[i].y &lt;&lt; " "    &lt;&lt; cloud-&gt;points[i].z &lt;&lt; std::endl;
  
    return (0);
  }
  </code></pre>
  
  <p>I have also set the <code>PCL_DIR</code> var in my <em>CMakeLists.txt</em> point to the PCL install dir, as said in the PCL tutorial <a href="http://pointclouds.org/documentation/tutorials/using_pcl_find_pcl.php" rel="nofollow">Using PCL in your own project</a>, at the bottom.</p>
  
  <p>Finally, the error I get is:</p>
  
  <pre><code>CMake Error at CMakeLists.txt:6 (find_package):
    By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "PCL", but
    CMake did not find one.
  
    Could not find a package configuration file provided by "PCL" (requested
    version 1.5.1) with any of the following names:
  
      PCLConfig.cmake
      pcl-config.cmake
  
    Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
    to a directory containing one of the above files.  If "PCL" provides a
    separate development package or SDK, be sure it has been installed.
  </code></pre>
  
  <p>Any idea?
  Thanks in advance.</p>
  
  <p>PS: In the <em>CMakeLists</em> file, I point <code>CMAKE_MODULE_PATH</code> to the directory of the <em>CMake</em> binary. Is that right?</p>
  
  <p>PS2: I'm using the MingW compiler.</p>
  
  <p>PS3: The SO is Windows 7 64 bits.</p>