“In-source builds are not allowed” in cmake

It wants you to create a separate build directory (anywhere), and run cmake there. For example:

mkdir my_build_dir
cd my_build_dir
rm ../CMakeCache.txt
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/jinha/OCV/source

Note the .. in this example telling cmake where to look for the source.

In case you didn’t remove CMakeCache.txt before building again, it will still show this error.
So, please remember to delete CMakeCache.txt first before running cmake.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)