相关疑难解决方法(0)

找不到模块FindOpenCV.cmake(配置过程中出错)

CMakeLists.txtC++中编写了一个使用OpenCV库的项目.当我尝试使用cmake创建项目时,我遇到了下一个配置问题:

CMake Error at CMakeLists.txt:15 (find_package):
  Could not find module FindOpenCV.cmake or a configuration file for package
  OpenCV.

  Adjust CMAKE_MODULE_PATH to find FindOpenCV.cmake or 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
Run Code Online (Sandbox Code Playgroud)

事实是我有一个环境变量用于我在Visual Studio中使用的路径没有问题.如果我不包含OpenCV,那么我可以配置和生成没有问题,但我需要解决问题.我不明白为什么cmake找不到OpenCV路径或如何解决它.

我还使用了此链接中提到的建议: FindOpenCV.cmake

有人也有这个问题吗?

opencv cmake

52
推荐指数
6
解决办法
10万
查看次数

标签 统计

cmake ×1

opencv ×1