title: CMake OpenCV Cannot Specify Link Libraries
body: <p>I am trying to run an OpenCV program written in C++ on Ubuntu. I followed <a href="http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html" rel="nofollow noreferrer" title="this">this</a> tutorial to install OpenCV on my system.</p>
  <p>I then followed <a href="http://docs.opencv.org/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html" rel="nofollow noreferrer">this</a> tutorial to run my code with the following Cmake commands as specified in the tutorial:</p>
  <pre><code>cmake_minimum_required(VERSION 2.8)
  project( PedestrianDetection )
  find_package( OpenCV REQUIRED )
  add_executable( PedestrianDetection PedestrianDetection.cpp )
  target_link_libraries(  ${OpenCV_LIBS} )
  </code></pre>
  <p>However, Cmake gives me the following output:</p>
  <pre><code>    CMake Error at CMakeLists.txt:5 (target_link_libraries):
    Cannot specify link libraries for target &quot;opencv_videostab&quot; which is not
    built by this project.
  </code></pre>
  <p>Can someone point me in the right direction to link the libraries?</p>
  <p>By the way, I am using OpenCV2.4.8</p>