1

i ran this following lines

cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D INSTALL_C_EXAMPLES=ON \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.0.0/modules \
    -D BUILD_EXAMPLES=ON 

and it generating this error

CMake Error: The source directory /home/pi/opencv-3.0.0/build/BUILD_EXAMPLES=ON does not exist`

How it could be solve ?

3

The last argument to the cmake command needs to be a directory containing a CMakeList.txt file.

Usually that's either the current directory . or the parent directory .. in the case of an out-of-source build where you are running the command from a separate build subdirectory:

cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D INSTALL_C_EXAMPLES=ON \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.0.0/modules \
    -D BUILD_EXAMPLES=ON ..

[I suspect you are following instructions that used .. and misinterpreted it as standing in for an arbitrary list of -D options rather than an actual directory argument]

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.