C++ opencv ubuntu 12.04 Cmake 错误:源目录似乎不包含 CmakeLists.txt
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24153845/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
opencv ubuntu 12.04 Cmake error : Source directory does not appear to contain CmakeLists.txt
提问by Clive
I'm using Ubuntu 12.04. I was trying to install OpenCV using the steps shown in http://karytech.blogspot.in/2012/05/opencv-24-on-ubuntu-1204.html
我正在使用 Ubuntu 12.04。我试图使用http://karytech.blogspot.in/2012/05/opencv-24-on-ubuntu-1204.html 中显示的步骤安装 OpenCV
But when it comes to the step for Compiling, i get an error :
但是当涉及到编译步骤时,我收到一个错误:
clive@clive-Aspire-4755:~/OpenCV-2.4.0/build$ cmake -D WITH_QT=ON -D WITH_XINE=ON -D WITH_OPENGL=ON -D WITH_TBB=ON -D BUILD_EXAMPLES=ON ..
CMake Error: The source directory "/home/clive" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Can anyone help me?
谁能帮我?
NOTE : The CMakeLists.txt file is present in the folder OpenCV-2.4.0 and not inside build.
注意:CMakeLists.txt 文件存在于文件夹 OpenCV-2.4.0 中,而不存在于 build 中。
回答by morynicz
Try /home/clive/OpenCV-2.4.0
instead of ..
at the end of the command.
尝试/home/clive/OpenCV-2.4.0
而不是..
在命令的末尾。
Also, It's generally easier to use ccmake instead cmake, regarding the options You are trying to set for setup.
此外,关于您尝试为设置设置的选项,使用 ccmake 而不是 cmake 通常更容易。
回答by Logesh P
I was facing the same issue, resolved by using the below command
我遇到了同样的问题,通过使用以下命令解决
Try with cmake .. your command