title: Where are the correct include directories for OpenCV projects using a local build / selfbuild of OpenCV?
body: <p>I'm trying to debug <a href="https://stackoverflow.com/q/19598664/575530">a frustrating problem whereby I cannot load video files in OpenCV</a>. <a href="https://stackoverflow.com/a/14820692/575530">One suggestion</a> is to abandon <a href="http://sourceforge.net/projects/opencvlibrary/files/opencv-win/" rel="nofollow noreferrer">the OpenCV pre-built libraries</a> and instead build OpenCV on the same machine as the failing project.</p>
  
  <p>That is what I am now trying to do.</p>
  
  <p>In the <a href="http://docs.opencv.org/trunk/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to" rel="nofollow noreferrer">OpenCV Quick Start about how to build applications with OpenCV inside the Microsoft Visual Studio</a> one important step is to add the additional include directories to the project property sheet by opening the project's property pages, navigating to <code>Configuration Properties -&gt; C/C++ -&gt; General -&gt; Additional Include Directories</code>. Using the pre-built distribution I am advised to add the directory <code>C:\OpenCV2.4.6\build\include</code> and indeed inside that directory are sub-directories <code>opencv</code> and <code>opencv2</code>. One of the files my project (like most OpenCV projects) will need is <code>highgui.hpp</code> from the line</p>
  
  <pre><code>#include "opencv2/highgui/highgui.hpp"
  </code></pre>
  
  <p>In the pre-built OpenCV distribution <code>highgui.hpp</code> ends up in <code>C:\OpenCV2.4.6\build\include\opencv2\highgui</code> and is thus correctly picked up at compile time because of the additional include directory.</p>
  
  <p>Having generated with CMake and built with Visual Studio 2012 the latest version of OpenCV on my machine (though <a href="https://stackoverflow.com/q/19616558/575530">perhaps unsuccessfully</a>) I cannot find <code>highgui.hpp</code>. It is not in <code>C:\Users\timregan\Documents\GitHub\opencv\build\include</code> (in fact there are no sub-directories <code>opencv</code> nor <code>opencv2</code> in there). It is in C:\opencv-2.4\modules\highgui\include\opencv2\highgui.</p>
  
  <p>What step, flag, etc. did I omit in order to generate place it correctly on my machine? Why are the <code>opencv</code> and <code>opencv2</code> sub-directories missing completely from <code>C:\Users\timregan\Documents\GitHub\opencv\build\include</code> after I have generated and built OpenCV?</p>
  
  <p>(N.B. I'm using CMake 2.8.12 and Visual Studio 2012 on a Windows 8 machine.)</p>