Could not find a configuration file for package opencv
I am trying to compile the code given at this page
I am using ROS Groovy on Ubuntu 12.04
When I run catkin_make, I get the following error:
CMake Error at /opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake:72 (find_package):
Could not find a configuration file for package opencv.
Set opencv_DIR to the directory containing a CMake configuration file for
opencv. The file will have one of the following names:
opencvConfig.cmake
opencv-config.cmake
Call Stack (most recent call first):
learning_image_transport/CMakeLists.txt:7 (find_package)
CMake Error at learning_image_transport/CMakeLists.txt:82 (target_link_libraries):
Cannot specify link libraries for target "learning_image_transport_node"
which is not built by this project.
learning_image_transport is my package name.
Cmake file:
cmake_minimum_required(VERSION 2.8.3)
project(learning_image_transport)
find_package(catkin REQUIRED COMPONENTS cv_bridge image_geometry image_transport opencv)
find_package(OpenCV)
include_directories(include
${catkin_INCLUDE_DIRS} /opt/ros/groovy/share/OpenCV)
Package.xml:
<buildtool_depend>catkin</buildtool_depend>
<build_depend>cv_bridge</build_depend>
<build_depend>image_transport</build_depend>
<build_depend>opencv2</build_depend>
<build_depend>image_geometry</build_depend>
<build_depend>opencv</build_depend>
<build_depend>OpenCV</build_depend>
<run_depend>cv_bridge</run_depend>
<run_depend>image_transport</run_depend>
<run_depend>opencv2</run_depend>
I have tried to follow the methods describe in various questions, with same problem, such as this and some more. However, the problem still exists in my case.