OpenCV cmake Could not find a package configuration file provided by "OpenCV"

ERROR:

CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "OpenCV" with any of the following names:

OpenCVConfig.cmake
opencv-config.cmake

Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set "OpenCV_DIR" to a directory containing one of the above files.

ANSWER:

adding the line like me

set(OpenCV_DIR /home/robot/tools/opencv-3.2.0/release/)

before the find_package() command in my cmakelists file.

你可能感兴趣的:(opencv)