Merge pull request #3075 from akarsakov:ipp_imgproc_fix
[profile/ivi/opencv.git] / samples / cpp / opencv_version.cpp
1 #include <opencv2/core/utility.hpp>
2 #include <iostream>
3
4 const char* keys =
5 {
6     "{ b build | | print complete build info }"
7     "{ h help  | | print this help           }"
8 };
9
10 int main(int argc, const char* argv[])
11 {
12     cv::CommandLineParser parser(argc, argv, keys);
13
14     if (parser.has("help"))
15     {
16         parser.printMessage();
17     }
18     else if (!parser.check())
19     {
20         parser.printErrors();
21     }
22     else if (parser.has("build"))
23     {
24         std::cout << cv::getBuildInformation() << std::endl;
25     }
26     else
27     {
28         std::cout << "OpenCV " << CV_VERSION << std::endl;
29     }
30
31     return 0;
32 }