title: C++ OpenCV include error 'file not found'
body: <p>I have a problem using OpenCV 4.1.2 in C++. I have this <code>CMakelists.txt</code>:</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.8.12)
  project( Barcode-cpp )
  find_package( OpenCV REQUIRED )
  add_compile_options(-std=c++11)
  add_library( src
          src/VideoVeed.h
          src/VideoVeed.cpp
  )
  add_executable( program
              program/main.cpp
  )
  target_link_libraries( program
                      src
                      ${OpenCV_LIBS}
  )
  </code></pre>
  
  <p>As you can see I have two folders with source code:</p>
  
  <ul>
  <li><code>program</code> contains <code>main.cpp</code></li>
  <li><code>src</code> contains <code>VideoVeed.h</code> &amp; <code>VideoVeed.cpp</code></li>
  </ul>
  
  <p>When I include OpenCV in <code>main.cpp</code> like this: <code>&lt;opencv2/opencv.hpp&gt;</code>, it works fine. But when I include OpenCV <em>(the same way)</em> it gives the error <code>fatal error: 'opencv2/opencv.hpp' file not found</code>. </p>
  
  <p>I think I'm doing something wrong in my <code>CMakelists.txt</code>, but I can't figure out what exactly.</p>
  
  <p>I hope someone is able to help me. Thanks in advance!</p>