Link to build documentation

If CUDA is installed, the build will probably fail. CUDA uses gcc6 but the current version (Mid 2018) is gcc7. To build without CUDA support use the cmake flag WITH_CUDA=FALSE

To include OpenCV in a CMakeLists.txt:

cmake_minimum_required(VERSION 3.10)
project(cpp_fun)

include_directories(${OpenCV_INCLUDE_DIRS})
find_package(OpenCV REQUIRED)

set(CMAKE_CXX_STANDARD 11)

add_executable(cpp_fun main.cpp)
target_link_libraries(cpp_fun ${OpenCV_LIBS})

Note: The target_link_libraries command needs to come after add_executable