1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 19:44:14 +08:00

makes text module dependency optional

This commit is contained in:
Suleyman TURKMEN
2017-11-17 00:33:06 +03:00
parent 09fd78e455
commit 90555dbd06
4 changed files with 46 additions and 11 deletions

View File

@@ -39,10 +39,13 @@
//
//M*/
#include <iostream>
#include <opencv2/opencv_modules.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