我正在尝试使用"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 上的包链接起来可能会很有用
通过在我的cmakelists文件中的find_package()
命令之前添加行set(OpenCV_DIR /usr/share/OpenCV/)
解决了这个问题。