Commit a30fb44d authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #1447 from sturkmen72:optional_dependencies

parents ccfca156 90555dbd
set(the_description "datasets framework")
ocv_define_module(datasets opencv_core opencv_imgcodecs opencv_ml opencv_flann opencv_text WRAP python)
ocv_define_module(datasets opencv_core opencv_imgcodecs opencv_ml opencv_flann OPTIONAL opencv_text WRAP python)
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267) # flann, Win64
......@@ -39,10 +39,13 @@
//
//M*/
#include "opencv2/datasets/tr_chars.hpp"
#include <iostream>
#include <opencv2/opencv_modules.hpp>
#include <opencv2/core.hpp>
#ifdef HAVE_OPENCV_TEXT
#include "opencv2/datasets/tr_chars.hpp"
#include <opencv2/core.hpp>
#include "opencv2/text.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
......@@ -127,3 +130,13 @@ int main(int argc, char *argv[])
return 0;
}
#else
int main()
{
std::cerr << "OpenCV was built without text module" << std::endl;
return 0;
}
#endif // HAVE_OPENCV_TEXT
......@@ -39,10 +39,13 @@
//
//M*/
#include "opencv2/datasets/tr_icdar.hpp"
#include <iostream>
#include <opencv2/opencv_modules.hpp>
#include <opencv2/core.hpp>
#ifdef HAVE_OPENCV_TEXT
#include "opencv2/datasets/tr_icdar.hpp"
#include <opencv2/core.hpp>
#include "opencv2/text.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
......@@ -50,8 +53,6 @@
#include <cstdio>
#include <cstdlib> // atoi
#include <iostream>
#include <string>
#include <vector>
......@@ -509,3 +510,13 @@ int main(int argc, char *argv[])
return 0;
}
#else
int main()
{
std::cerr << "OpenCV was built without text module" << std::endl;
return 0;
}
#endif // HAVE_OPENCV_TEXT
......@@ -39,10 +39,13 @@
//
//M*/
#include "opencv2/datasets/tr_svt.hpp"
#include <iostream>
#include <opencv2/opencv_modules.hpp>
#include <opencv2/core.hpp>
#ifdef HAVE_OPENCV_TEXT
#include "opencv2/datasets/tr_svt.hpp"
#include <opencv2/core.hpp>
#include "opencv2/text.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
......@@ -50,8 +53,6 @@
#include <cstdio>
#include <cstdlib> // atoi
#include <iostream>
#include <string>
#include <vector>
......@@ -309,3 +310,13 @@ int main(int argc, char *argv[])
return 0;
}
#else
int main()
{
std::cerr << "OpenCV was built without text module" << std::endl;
return 0;
}
#endif // HAVE_OPENCV_TEXT
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