cmake错误“源似乎不包含CMakeLists.txt" [英] cmake error 'the source does not appear to contain CMakeLists.txt'

查看:1012
本文介绍了cmake错误“源似乎不包含CMakeLists.txt"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Ubuntu 16.04中安装opencv.安装必要的先决条件后,我使用了以下命令:-

I'm installing opencv in ubuntu 16.04. After installing the necessary prerequisites I used the following command:-

kvs@Hunter:~/opencv_contrib$ mkdir build
kvs@Hunter:~/opencv_contrib$ cd build
kvs@Hunter:~/opencv_contrib/build$ 
kvs@Hunter:~/opencv_contrib/build$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX+/usr/local -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D BUILD_EXAMPLES=ON ..

但是它产生了一个错误:-

but it produced an error:-

CMake Error: The source directory "/home/kvs/opencv_contrib" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

我使用了模块"文件夹中提供的命令.我该如何解决? 我在

I used the command provided in the folder 'module' documentation. How do I solve it? I tried the answers here at stack-overflow and a few other question but still can't figure it out.

Project Git存储库此处.

Project Git repository here.

推荐答案

您应该在opencv文件夹而不是opencv-contrib文件夹中进行mkdir buildcd build. CMakeLists.txt在那里.

You should do mkdir build and cd build while inside opencv folder, not the opencv-contrib folder. The CMakeLists.txt is there.

这篇关于cmake错误“源似乎不包含CMakeLists.txt"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆