ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

First, you need to find where 'OpenCVConfig.cmake' is, using following command:

locate OpenCVConfig.cmake

And then you just need to add the following command before 'find_package'.

set(OpenCV_DIR path_include_OpenCVConfig.cmake)

First, you need to find where 'OpenCVConfig.cmake' is, using following command:

locate OpenCVConfig.cmake

And then you just need to add the following command before 'find_package'.

set(OpenCV_DIR path_include_OpenCVConfig.cmake)

For example,

set(OpenCV_DIR /usr/local/lib/cmake/opencv4)
find_package(OpenCV 4.0.0 REQUIRED)