title: OpenCV3.1 compilation error 'ffmpeg/avformat.h' file not found
body: <p>On <em>MacOS 10.9.5 Mavericks</em>. I used homebrew to install <code>Python</code>, <code>cmake</code>, <code>ffmpeg</code>.
  Entering <code>ffmpeg</code> in terminal shows it is installed.
  I downloaded <code>Opencv3</code> and <code>opencv_contrib</code></p>
  
  <p>Then <code>cmake</code> with this:</p>
  
  <pre><code>cmake -D CMAKE_BUILD_TYPE=RELEASE \
      -D WITH_CUDA=OFF -D CMAKE_INSTALL_PREFIX=/Users/stefan/Downloads/opencv-3.1.0dl/build \
      -D PYTHON2_LIBRARIES=/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/bin \
      -D PYTHON2_PACKAGES_PATH=~/.virtualenvs/cv/lib/python2.7/site-packages \
      -D PYTHON2_NUMPY_INCLUDE_DIRS=~/.virtualenvs/cv/lib/python2.7/site-packages/numpy/core/include \
      -D PYTHON2_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Headers \
      -D INSTALL_PYTHON_EXAMPLES=ON -D WITH_TBB=ON  -D INSTALL_C_EXAMPLES=ON \
      -D FFMPEG_INCLUDE_DIR=/usr/local/Cellar/ffmpeg/3.0.2/include \
      -D FFMPEG_LIB_DIR=/usr/local/Cellar/ffmpeg/3.0.2/lib \
      -D BUILD_EXAMPLES=ON \
      -D OPENCV_EXTRA_MODULES_PATH=~/Downloads/opencv_contrib-3.0.0/modules ..
  </code></pre>
  
  <p>Terminal output included this:</p>
  
  <pre><code>--   Video I/O:
  --     DC1394 1.x:                  NO
  --     DC1394 2.x:                  NO
  --     FFMPEG:                      YES
  --       codec:                     YES (ver 57.24.102)
  --       format:                    YES (ver 57.25.100)
  --       util:                      YES (ver 55.17.103)
  --       swscale:                   YES (ver 4.0.100)
  --       resample:                  YES (ver 3.0.0)
  --       gentoo-style:              YES
  </code></pre>
  
  <p>But <code>CMakeError.log</code> had this as its only error:</p>
  
  <blockquote>
    <p>ffmpeg/avformat.h file not found</p>
  </blockquote>
  
  <p>The file does exist at </p>
  
  <pre><code>/usr/local/Cellar/ffmpeg/3.0.2/include/libavformat/avformat.h
  </code></pre>
  
  <p>I do not understand why I am getting this error if I properly specified the <code>FFMPEG</code> include directories in the <code>cmake</code> command. Also the variables <code>FMPEG_INCLUDE_DIR</code> and <code>FFMPEG_LIB_DIR</code> do not exist in the file, <code>CMakeLists.txt</code>. 
  <br/>Does that make my use of those variables in the cake command useless?</p>