I am trying to build the OpenCV samples which come with the source package and I get the following:
CMake Error at CMakeLists.txt:10 (ocv_check_dependencies):
Unknown CMake command "ocv_check_dependencies".
I did install OpenCV using
cmake .
make
sudo make install
and I got a tutorial snippet working (thus I suppose it is installed correctly as a library). However, compiling the samples does not work.
I guess I have to somehow configure CMake to have “ocv_check_dependencies” – but how? I am lost!
I got it.
In order to build the samples one has to change the default configuration for cmake by providing it via
-D. What I did wrong was that I tried to execute cmake from within thesamplesdirectory.The proper way to build the samples is invoking cmake like so (from within the root directory of the unpacked archive):
which will turn samples ON. One can proceed using make, make install than. The samples can be found in
binafter building.See also FAQ