find_package(OpenCV
PATHS /opt/opencv
NO_DEFAULT_PATH
REQUIRED)
if (OpenCV_FOUND)
include_directories(${
OpenCV_INCLUDE_DIRS})
message( ${
OpenCV_LIBS})
else()
message("OpenCV not found, so we won't build the project.")
endif()