cmake_minimum_required(VERSION 2.8) project( MotionDetection ) find_package( OpenCV REQUIRED ) find_package( MPI REQUIRED ) include_directories( ${OpenCV_INCLUDE_DIRS} ) include_directories(SYSTEM ${MPI_INCLUDE_PATH}) add_executable( MotionDetection checkvideo.cpp ) target_link_libraries( MotionDetection ${OpenCV_LIBS} ) target_link_libraries(MotionDetection ${MPI_C_LIBRARIES})