嗨,我编写了一个基本程序来打开图像文件。我正在尝试使用 CMake 来编译它。这就是我的 CMake 文件的样子:
cmake_minimum_required(VERSION 2.6)
project( textures )
find_package( OpenCV REQUIRED )
add_executable( textures textures.cpp )
target_link_libraries( textures ${OpenCV_LIBS} )
当我运行“cmake .”时,出现以下错误。
CMake Error at CMakeLists.txt:3 (find_package):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.
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. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
关于这意味着什么以及如何解决它的任何想法?谢谢。