I am trying to build opencv with cmake and am running into issues.
I have downloaded the Windows opencv 2.3.1 to C:/Users/chris/opencv
. I open up the CMake GUI (2.8.5 version of CMake) and put the source directory as C:/Users/chris/opencv/modules
and the "Where to build the binaries" at C:/temp/opencv_binaries
I hit Configure
and chose Visual Studio 2010. I then hit Configure
again and get the following error output:
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 developer开发者_如何学JAVAs. Use -Wno-dev to suppress it.
Configuring incomplete, errors occurred!
What gives? What should I do to fix this?
Unless it has changed recently, the source directory should be C:/Users/chris/opencv/
- it will be the highest-level directory with a CMakeLists.txt file in it.
This warning is for project developers. Use -Wno-dev to suppress it.
To turn -Wno-dev
on you just need to select Options
-> Suppress dev Warnings (-Wno-dev)
in the menu of CMake GUI.
what is the content of your CMakeLists.txt file?
for avoiding the warning, insert "cmake_minimum_required(VERSION 2.8)" into the first line of your CMakeLists.txt
精彩评论