在Debian Wheezy上使用cmake时找不到OpenCV

时间:2015-08-21 18:14:18

标签: c++ opencv debian beagleboneblack

类似问题:OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOT FOUND

修改的 添加了另一个链接问题:cmake is not working in opencv c++ project

我一直在尝试将cmake与opencv一起使用,但每当我使用cmake时......它说:

CMake Error at CMakeLists.txt:5 (find_package): Found package configuration file: /home/debian/opencv_sources/opencv-2.4.9/release/OpenCVConfig.cmake but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOT FOUND. -- Configuring incomplete, errors occurred!

我使用的cmake文件是:

cmake_minimum_required(VERSION 2.4.9)
project(IDMCPP)

SET("OpenCV_DIR" "/home/debian/opencv_sources/opencv-2.4.9/release")
find_package( OpenCV REQUIRED )
include_directories(${OpenCV_INDLUDE_DIRS})

add_executable(IDMTEST IDMTEST.cpp)
target_link_libraries(IDMTEST ${OpenCV_LIBS})

我在我的构建文件夹中运行cmake ..我使用http://www.javieriparraguirre.net/installing-opencv-debian/上的教程来手动安装和修复问题,但无济于事。

运行" $ pkg-config --modversion opencv"给出2.4.9所以版本至少匹配。

有没有人知道如何通过该标志设置?

0 个答案:

没有答案