title: Error configuring OpenCV project with CMake on Windows
body: <p>I used the prebuilt OpenCV 3.0.0 version. It works when I create a Visual Studio project directly, and when I add include and library directories. </p>
  
  <p>Now I am making a CMakeList.txt file (so that I can run the same code on different systems). It will be used to create the Visual Studio project on Windows, and Makefile on Unixes, etc.</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.8)
  project( Facade )
  find_package( OpenCV REQUIRED )
  add_executable( Facade grammar.cpp )
  target_link_libraries( Facade ${OpenCV_LIBS} )
  </code></pre>
  
  <p>When I generate the Visual Studio file on Windows, I got the following error:</p>
  
  <pre><code>CMake Warning at C:/opencv/build/OpenCVConfig.cmake:166 (message):
    Found OpenCV Windows Pack but it has no binaries compatible with your
    configuration.
  
    You should manually point CMake variable OpenCV_DIR to your build of OpenCV
    library.
  Call Stack (most recent call first):
    CMakeLists.txt:3 (find_package)
  
  
  CMake Error at CMakeLists.txt:3 (find_package):
    Found package configuration file:
  
      C:/opencv/build/OpenCVConfig.cmake
  
    but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
    NOT FOUND.
  </code></pre>
  
  <p>Currently, OpenCV_DIR is C:\opencv\build, where it holds the CMake files. If I point OpenCV_DIR to C:\opencv\build\x64\vc12, it says, can't find CMake files.</p>
  
  <p>How do I fix this?</p>