# Revision history [back]

OpenCV is an external library in Electric (which I am guessing you are using). Try installing the library. On the Mac using homebrew do: brew install opencv.

In my CMakeLists.txt file to build a fictional program called test, I have the following:

find_package(OpenCV 2.3.1 REQUIRED)
target_link_libraries(test ${OpenCV_LIBS})  If you are not sure which opencv cmake is finding, you can do something like this to the CMakeLists.txt: if(OpenCV_FOUND) message("Found OpenCV${OpenCV_INCLUDE_DIR}")
endif(OpenCV_FOUND)


Hope that helps!

find_package(OpenCV 2.3.1 REQUIRED)
target_link_libraries(test ${OpenCV_LIBS})  If you are not sure which opencv cmake is finding, you can do something like this to the CMakeLists.txt: if(OpenCV_FOUND) message("Found OpenCV${OpenCV_INCLUDE_DIR}")