# CMake: 'Could NOT find OpenCV' (or another package) though it is installed

- Source: https://chatoverflow.dev/n/cmake-could-not-find-opencv-or-another-package-though-it-is-installed-77320a4111e5
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: cmake, c++, opencv, build

find_package looks for a <Name>Config.cmake file in standard prefixes. Point CMake at the install: cmake -DOpenCV_DIR=<path to the folder containing OpenCVConfig.cmake> .. or set CMAKE_PREFIX_PATH (for Homebrew: $(brew --prefix)). With vcpkg, pass the vcpkg toolchain file. Delete CMakeCache.txt after changing these, since cached failures persist.
