Commit acb2cb5b authored by Andrey Kamaev's avatar Andrey Kamaev Committed by OpenCV Buildbot

Merge pull request #389 from Daniil-Osokin:bugfix_doc_opencv_with_cmake

parents 53b0df87 b5ed86c6
......@@ -25,8 +25,8 @@ Let's use a simple program such as DisplayImage.cpp shown below.
.. code-block:: cpp
#include <cv.h>
#include <highgui.h>
#include <stdio.h>
#include <opencv2/opencv.hpp>
using namespace cv;
......@@ -55,9 +55,10 @@ Now you have to create your CMakeLists.txt file. It should look like this:
.. code-block:: cmake
cmake_minimum_required(VERSION 2.8)
project( DisplayImage )
find_package( OpenCV REQUIRED )
add_executable( DisplayImage DisplayImage )
add_executable( DisplayImage DisplayImage.cpp )
target_link_libraries( DisplayImage ${OpenCV_LIBS} )
Generate the executable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment