ROS“catkin_make”找不到OpenCVConfig.cmake

时间:2016-07-27 14:42:26

标签: c++ opencv cmake ros catkin

我正在尝试使用“catkin_make”命令构建一个需要OpenCV的ROS包。

尝试构建时,我收到CMakeList命令“find_package(OpenCV REQUIRED)”的以下错误:

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.

我在/ usr / share / OpenCV /中找到了“OpenCVConfig.cmake”文件,并在“OpenCV_DIR”env变量中设置了此位置。 尽管如此,我仍然得到上面列出的错误。

有什么想法吗?

知道我正在尝试将OpenCV4Tegra与Jetson TX1上的软件包链接起来可能很有用

1 个答案:

答案 0 :(得分:1)

通过在我的cmakelists文件中的set(OpenCV_DIR /usr/share/OpenCV/)命令之前添加行find_package()来解决此问题。