使用cmake错误构建opencv

chr*_*ris 2 opencv makefile cmake

我正在尝试使用cmake构建opencv并遇到问题.

我已经下载了Windows opencv 2.3.1 C:/Users/chris/opencv.我打开CMake GUI(2.8.5版本的CMake)并将源目录C:/Users/chris/opencv/modules和"在哪里构建二进制文件"放在C:/temp/opencv_binaries

我点击Configure并选择了Visual Studio 2010.然后我再次点击Configure并获得以下错误输出:

CMake Error at calib3d/CMakeLists.txt:1 (define_opencv_module):
  Unknown CMake command "define_opencv_module".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
Run Code Online (Sandbox Code Playgroud)

是什么赋予了?我该怎么做才能解决这个问题?

dan*_*ain 7

除非最近更改,否则源目录应该是C:/Users/chris/opencv/- 它将是包含CMakeLists.txt文件的最高级目录.