[英]ROS “catkin_make” cannot find OpenCVConfig.cmake
I'm trying to build a ROS package which requires OpenCV using the "catkin_make" command. 我正在尝试使用“ catkin_make”命令构建一个需要OpenCV的ROS软件包。
Upon trying to build, I get the following error for CMakeList command "find_package(OpenCV REQUIRED)": 尝试构建时,对于CMakeList命令“ find_package(需要OpenCV)”,我得到以下错误:
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.
I found the "OpenCVConfig.cmake" file at /usr/share/OpenCV/ and have set this location within the "OpenCV_DIR" env variable. 我在/ usr / share / OpenCV /中找到了“ OpenCVConfig.cmake”文件,并在“ OpenCV_DIR” env变量中设置了此位置。 Despite this, I still get the error listed above.
尽管如此,我仍然收到上面列出的错误。
Any ideas? 有任何想法吗?
It might be useful to know that I'm trying to link OpenCV4Tegra with the package on a Jetson TX1 知道我正在尝试将OpenCV4Tegra与Jetson TX1上的软件包链接起来可能很有用
通过在cmakelists文件中的find_package()
命令之前添加行set(OpenCV_DIR /usr/share/OpenCV/)
此find_package()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.