Schütze Schütze - 9 months ago 81
C++ Question

OpenCV Environment variable changed

I had my standalone installation of OpenCV on my Linux machine and it was running OK. I installed ROS (comes with its OpenCV) and today I cannot run my CMakeLists.txt in any of my OpenCV projects, getting the error of :

CMake Error at CMakeLists.txt:20 (find_package):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.

Could not find a package configuration file provided by "OpenCV" with any
of the following names:


Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been

I am kinda sure this happened because some environment variable got changed however I don't know where to look at.

Could someone walk me through this?

Answer Source

Reinstalling OpenCV solved the problem for me, since it re-modified the Environment variable.