1 Example for CMake build system.
3 Compile OpenCV with cmake, preferently in an off-tree build, for example:
7 $ cmake <OPENCV_SRC_PATH>
10 And, *only optionally*, install it with.
13 Then create the binary directory for the example with:
14 $ mkdir example-release
17 Then, if "make install" have been executed, directly running
18 $ cmake <OPENCV_SRC_PATH>/samples/c/example_cmake/
20 will detect the "OpenCVConfig.cmake" file and the project is ready to compile.
22 If "make install" has not been executed, you'll have to manually pick the opencv
23 binary directory (Under Windows CMake may remember the correct directory). Open
25 $ cmake-gui <OPENCV_SRC_PATH>/samples/c/example_cmake/
27 And pick the correct value for OpenCV_DIR.