我想构建一个需要opencv的项目。 我已经设置了opencv并将这些变量添加到环境变量中:
OPENCV_DIR
- > c:\opencv\build\x86\vc12
PATH
- > %OPENCV_DIR%\bin
然后我执行以下操作:
mkdir build
cd build
set OpenCV_DIR="C:\opencv\build"
cmake -G "Visual Studio 14 2015" -D OpenCV_DIR=%OpenCV_DIR% ..
但是我得到了这些错误:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1753 (message):
Unable to find the requested Boost libraries.
Boost version: 1.61.0
Boost include path: C:/Program Files/boost_1_61_0
Could not find the following Boost libraries:
boost_system
boost_filesystem
boost_signals
No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
CMakeLists.txt:88 (find_package)
CMake Error at CMakeLists.txt:89 (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!
See also "C:/Users/vahab/Desktop/PartsBasedDetector-master/PartsBasedDetector-master/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/vahab/Desktop/PartsBasedDetector-master/PartsBasedDetector-master/build/CMakeFiles/CMakeError.log".
现在我不关心使用boost库的错误。我只是想知道为什么在设置相关变量时它没有找到opencv。我已经探索了其他stackoverflow页面,但没有找到合适的答案。有人可以帮忙吗? 感谢