问题:
~/DBow3/build$ cmake ..
-- OpenCV ARCH:
-- OpenCV RUNTIME:
-- OpenCV STATIC: OFF
CMake Warning at /home/richard/opencv-3.1.0/cmake/OpenCVConfig.cmake:166 (message):
Found OpenCV Windows Pack but it has no binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:49 (find_package)
CMake Error at CMakeLists.txt:49 (find_package):
Found package configuration file:
/home/richard/opencv-3.1.0/cmake/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
-- Configuring incomplete, errors occurred!
See also "/home/richard/DBow3/build/CMakeFiles/CMakeOutput.log".
解决方法:
在OpenCVConfig.cmake中,将倒数第二行、倒数第三行修改如下:
set(OpenCV_FOUND TRUE CACHE BOOL "" FORCE)
set(OPENCV_FOUND TRUE CACHE BOOL "" FORCE)
cmake结果:
cmake ..
-- OpenCV ARCH:
-- OpenCV RUNTIME:
-- OpenCV STATIC: OFF
CMake Warning at /home/richard/opencv-3.1.0/cmake/OpenCVConfig.cmake:166 (message):
Found OpenCV Windows Pack but it has no binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:49 (find_package)
-- -------------------------------------------------------------------------------
-- GNU COMPILER
-- -------------------------------------------------------------------------------
--
-- -------------------------------------------------------------------------------
-- General configuration for DBoW3 0.0.1
-- -------------------------------------------------------------------------------
--
Compiler:/usr/bin/c++
-- C++ flags (Release): -Wall -Wno-long-long -ffunction-sections -fomit-frame-pointer -O3 -mmmx -msse -msse2 -msse3 -DNDEBUG -std=c++11
-- C++ flags (Debug): -Wall -Wno-long-long -ffunction-sections -g3 -O0 -DDEBUG -D_DEBUG -W -Wextra -Wno-return-type -std=c++11
-- CMAKE_CXX_FLAGS: -Wall -Wno-long-long -ffunction-sections
-- CMAKE_BINARY_DIR: /home/richard/DBow3/build
--
-- CMAKE_SYSTEM_PROCESSOR = x86_64
-- CMAKE_INSTALL_PREFIX = /usr/local
-- CMAKE_BUILD_TYPE = Release
-- CMAKE_MODULE_PATH = /usr/local/lib/cmake/;/usr/lib/cmake
-- BUILD_UTILS= ON
-- BUILD_TESTS=
-- OPENCV_DIR= /home/richard/opencv-3.1.0/cmake VERSION=
-- USE_CONTRIB= OFF
--
-- OpenCV_LIB_DIR=
-- CMAKE_INSTALL_PREFIX=/home/richard/DBow3/build
--
--
-- Change a value with: cmake -D<Variable>=<Value>
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/richard/DBow3/build