使用cmake错误构建opencv
我试图用cmake构建opencv,但遇到了一些问题 我已将Windows opencv 2.3.1下载到使用cmake错误构建opencv,opencv,makefile,cmake,Opencv,Makefile,Cmake,我试图用cmake构建opencv,但遇到了一些问题 我已将Windows opencv 2.3.1下载到C:/Users/chris/opencv。我打开CMake GUI(CMake的2.8.5版本),将源目录设置为C:/Users/chris/opencv/modules,并将“构建二进制文件的位置”设置为C:/temp/opencv_binaries 我点击了Configure并选择了VisualStudio2010。然后我再次点击Configure,得到以下错误输出: CMake Er
C:/Users/chris/opencv
。我打开CMake GUI(CMake的2.8.5版本),将源目录设置为C:/Users/chris/opencv/modules
,并将“构建二进制文件的位置”设置为C:/temp/opencv_binaries
我点击了Configure
并选择了VisualStudio2010。然后我再次点击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!
有什么好处?我应该怎么做才能解决这个问题?您的CMakeLists.txt文件的内容是什么
为避免警告,请在CMakeLists.txt的第一行中插入“cmake_minimum_required(2.8版)”,除非最近发生了更改,否则源目录应为
C:/Users/chris/opencv/
——它将是包含CMakeLists.txt文件的最高级别目录
This warning is for project developers. Use -Wno-dev to suppress it.
要打开-Wno-dev
,只需在CMake GUI的菜单中选择选项->抑制开发警告(-Wno-dev)