cmake_minimum_required (VERSION 2.6) project (Example) set(CMAKE_CXX_FLAGS "-std=c++0x") find_package( OpenCV REQUIRED ) add_executable (main ImageAquisition.cpp) target_link_libraries(main ${OpenCV_LIBS})