Mac下编译OpenCV时"Could not find module FindOpenCV.cmake"错误解决方法

使用brew安装了OpenCV3,在使用make进行编译时,find_package(OpenCV 3 REQUIRED)语句会显示:

1
2
3
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
Make did not find one.

错误。

在终端中运行:

1
brew ln opencv3 --force

问题解决。