Cmake error: the source directory “opencv installation directory” does not appear to contain cmakelists.txt
I want to build opencv 4.5.0 in Ubuntu 20.04 this morning; In the C + + environment, I tried to learn opencv in the Linux system, but I was not familiar with the use of Linux system. I was puzzled by one step in building the environment, and the error was as follows:
Cmake error: the source directory “opencv installation directory” does not appear to contain cmakelists.txt
In Baidu search, we found many solutions provided by big men. After some attempts, we failed collectively. After carefully studying the reasons for the error and checking our opencv installation directory, we found that the specific path of our cmakelists.txt
is "home"/ ××××/ Opencv/opencv master/cmakelists.txt "
instead of " home/ ×××/ Opencv/cmakelists. TXT "
, finally found the cause of the error and solved the problem. Therefore, I hope this article can help some beginners like me. Thank you for your support!
Read More:
- [Solved] Cmake compile opencv open-source project Error: but it set OpenCV_FOUND to FALSE so package “OpenCV” is considered to be…
- [Solved] CMake Error at CMakeLists.txt:92 (add_subdirectory)
- [Solved] CMake Error: The current CMakeCache.txt directory is different than xxx
- [Solved] QT cmak Compile Error: CMake Error: The source.. does not match the soused
- [Solved] Opencv Compile Error: (CMake Error: The following variables are used in this project, but they are set to not)
- [Solved] CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
- How to Solve QT Error: The build directory needs to be at the same level as the source directory.
- [Solved] Opencv3. X fatal error: opencv2/nonfree/nonfree.hpp: there is no such file or directory
- [Solved] ERROR: Could not open requirements file: [Errno 2] No such file or directory : ‘requirments.txt‘
- [Solved] ORB_SLAM3 Compile Error: opencv4.0 not found four
- [Solved] cmake: symbol lookup error: cmake: undefined symbol: _ZN4Json5ValueC1ERKSs
- Cmake Compile opencv error: The system is: Windows – 10.0.19042 – AMD64 (Log File)
- [Solved] CCS compilation and debug error: Source lookup: unable to restore CPU specific source container – expecting valid source container id value.
- Opencv Can not Find opencv2/gpu/gpu.hpp [How to Solve]
- [Solved] Mac Install mongodb error: NonExistentPath: Data directory /data/db not found.
- [Solved] Failed to find glog – Could not find glog include directory, set…
- [Solved] CMake Error: Could not create named generator Visual Studio 16 2019
- [Solved] CMake Error: Could not create named generator Visual Studio 16 2019 -A Win64
- How to Solve Msys2/mingw64 Run cmake GUI Error
- [Solved] ./my_cmake_exe: error while loading shared libraries: libswresample.so.4: cannot open shared object file: No such file or directory