For building the attached cpp file I receive CMAKE_MODULE_PATH error while running make command on Terminal. It uses Gphoto2 and OpenCV to capture live images from a digital camera. This files is based on http://docs.opencv.org/master/db/d56/tutorial_capture_graycode_pattern.html#gsc.tab=0 I believe the problem is caused by a wrong CMakeLists.txt file, however I do not know how to fix it. Thanks for your guidance in advance.
grayp.cpp file
include <opencv2 imgproc.hpp="">
include <opencv2 highgui.hpp="">
include <opencv2 structured_light.hpp="">
include <iostream>
include <stdio.h>
using namespace cv; using namespace std; int main( ) {
// Open camera, using libgphoto2 VideoCapture cap1( CAP_GPHOTO2 );
if( !cap1.isOpened() ) { // check if cam1 opened cout << "cam1 not opened!" << endl;} else cout <<"FFFFFFFFFFFFFFFF"<< endl;
// the camera will be deinitialized automatically in VideoCapture destructor cout << "Closing program" << endl; return 0; }
===============================================================================
CMakeLists.txt
cmake_minimum_required(VERSION 2.8) project( grayp ) find_package( OpenCV REQUIRED ) add_executable( grayp grayp.cpp ) target_link_libraries( grayp ${OpenCV_LIBS} ) option(GPHOTO2 "test" ON) find_package( GPHOTO2 REQUIRED ) include_directories(/usr/local/include/gphoto2) include_directories(/home/pi/Downloads/libgphoto2-2.5.9/libgphoto2) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/home/pi/code/prof/gray")