title: Why is this boost header file not included
body: <p>I'm building my c++ program with cmake on a Mac. The compiler gives me following Error:</p>
  
  <pre><code>error: boost/filesystem.hpp: No such file or directory
  </code></pre>
  
  <p>The line that triggers the error is the following:</p>
  
  <pre><code>#include "boost/filesystem.hpp"
  </code></pre>
  
  <p>or</p>
  
  <pre><code>#include &lt;boost/filesystem.hpp&gt;
  </code></pre>
  
  <p>Which of the above I use doesn't changed the Error</p>
  
  <p>But in my CMakeLists.txt I include the boost headers in the following way:</p>
  
  <pre><code>FIND_PACKAGE(Boost) 
  MESSAGE("Boost information:") 
  MESSAGE("  Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}") 
  MESSAGE("  Boost_LIBRARIES: ${Boost_LIBRARIES}") 
  MESSAGE("  Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}") 
  
  INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
  LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
  </code></pre>
  
  <p>Boost include dirs is filled with "/opt/local/include/" during the cmake process and this folder contains a folder boost which contains the filesystem.hpp </p>
  
  <p>Boost gives the following messages while generating the Makefile, I only copied the boost part:</p>
  
  <pre><code>-- Boost version: 1.38.0
  -- Found the following Boost libraries:
  Boost information:
  Boost_INCLUDE_DIRS: /opt/local/include
  Boost_LIBRARIES: 
  Boost_LIBRARY_DIRS: /opt/local/lib
  -- Configuring done
  </code></pre>
  
  <p>While running make VERBOSE=1 This line contains the error:</p>
  
  <pre>
  cd /Users/janusz/Documents/workspace/ImageMarker/Debug/src && 
  /usr/bin/c++ -O3 -Wall -Wno-deprecated -g -verbose -I/Users/janusz/Documents/workspace/ImageMarker/src/. -o CMakeFiles/ImageMarker.dir/FaceRecognizer.cpp.o -c /Users/janusz/Documents/workspace/ImageMarker/src/FaceRecognizer.cpp
  /Users/janusz/Documents/workspace/ImageMarker/src/FaceRecognizer.cpp:8:32: error: boost/filesystem.hpp: No such file or directory
  make[2]: *** [src/CMakeFiles/ImageMarker.dir/FaceRecognizer.cpp.o] Error 1
  </pre>
  
  <p>Do you understand why the compiler isn't picking the /opt/local/include directory? </p>
  
  <p>If you need more information I'm happy to provide it</p>