Ask Your Question
1

Compiling cpp samples on Mac OS X: “Unknown CMake command "ocv_check_dependencies". ”

asked 2012-10-30 15:39:40 -0600

scravy gravatar image

I try to compile the cpp samples on Mac OS X Snow Leopard (using CMake) and what I get is

CMake Error at c/CMakeLists.txt:10 (ocv_check_dependencies):
    Unknown CMake command "ocv_check_dependencies".

Compiling the library (cmake ., make, sudo make install) worked just fine and I was able to compile and running a tutorial code. What am I missing?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2013-02-07 03:56:33 -0600

I think You either need to build the whole library using option build_examples/build_samples on (i recommend using some kind of gui for cmake), or include OpenCVModule.cmake file, found in cmake directory of the library source, to the CMakeLists.txt file that You are trying to use.

The second one is just an assumption (didn't have this problem), but it looks like the CMakeLists.txt You are trying to use doesn't load the macros located in OpenCVModules.cmake, including the ocv_check_dependencies one.

edit flag offensive delete link more
0

answered 2013-12-17 00:00:31 -0600

lvjing gravatar image

updated 2013-12-17 00:02:01 -0600

yes, I think you can just compiler with the build_all.sh in the same directory with these examples. use linux command: ./build_all.sh if you are under linux. I have build these examples by this way. hope it will help you!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-10-30 15:39:40 -0600

Seen: 2,811 times

Last updated: Dec 17 '13