First time here? Check out the FAQ!

Ask Your Question
0

cmake error

asked Oct 1 '14

pn gravatar image

updated Oct 3 '14

Hello,

I am new to opencv and I've just got opencv installed. I'm trying to get this simple example working, but I'm getting a compilation error. Any leads will be highly appreciated.

http://docs.opencv.org/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html#create-a-cmake-file

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find OpenCV (missing: OpenCV_INCLUDE_DIR) (found version "3.0.0")
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindOpenCV.cmake:300 (find_package_handle_standard_args)
  CMakeLists.txt:3 (find_package)
Preview: (hide)

1 answer

Sort by » oldest newest most voted
1

answered Oct 1 '14

boaz001 gravatar image

To the CMakeLists.txt you created add:

include_directories( ${OpenCV_INCLUDE_DIRS} )
Preview: (hide)

Comments

This will only work if you have done a make install of your openCV installation. Else make the OpenCV_INCLUDE_DIRS system variable first and assign it to your include folder location. This can simply be done by adding the following line in front of this.

 OpenCV_INCLUDE_DIRS=/path/to/include/folder/
 export OpenCV_INCLUDE_DIRS
StevenPuttemans gravatar imageStevenPuttemans (Oct 3 '14)edit

Question Tools

Stats

Asked: Oct 1 '14

Seen: 2,057 times

Last updated: Oct 03 '14