Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error compiling project with CMAKE

Hello, I want to compile my opencv project using cmake. Here is my CMakeLists.txt file

cmake_minimum_required(VERSION 2.8)
project( opencv_test )
set(OpenCV_DIR "C:/opencv/build/")

find_package(OpenCV REQUIRED)

include_directories( ${OpenCV_INCLUDE_DIRS} )
add_executable( opencv_test opencv_test.cpp )
target_link_libraries( opencv_test ${OpenCV_LIBS} )

However, I get the following error when calling find_package:

CMake Warning at C:/opencv/build/OpenCVConfig.cmake:176 (message):
  Found OpenCV Windows Pack but it has no binaries compatible with your

  You should manually point CMake variable OpenCV_DIR to your build of OpenCV
Call Stack (most recent call first):
  CMakeLists.txt:7 (find_package)

CMake Error at CMakeLists.txt:7 (find_package):
  Found package configuration file:


  but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be

Please help. Thank you very much,

Best regards, bko