Cmake Error: the Source Directory /Home/Pi/Opencv-3.0.0/Build/Build_Examples=On Does Not Exist
I Ran the Following Lines Cmake -D Cmake_Build_Type=Release \ -D Cmake_Install_Prefix=/Usr/Local \ -D Install_C_Examples=On \ -D Install_Python_Examples=On \...
I ran the 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 got this error
CMake Error: The source directory /home/pi/opencv-3.0.0/build/BUILD_EXAMPLES=ON does not exist`
How could this be solved?
1 Answer
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]