From 429418ebea0d340e577af78cbb848c7b8291dcf4 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 11 Apr 2019 17:28:06 +0300 Subject: [PATCH] text: fix build on windows avoid broken min/max macros from tesseract headers --- modules/text/src/ocr_tesseract.cpp | 8 ++++++++ modules/text/src/precomp.hpp | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/text/src/ocr_tesseract.cpp b/modules/text/src/ocr_tesseract.cpp index 07aad1ff7..d04c698e1 100644 --- a/modules/text/src/ocr_tesseract.cpp +++ b/modules/text/src/ocr_tesseract.cpp @@ -48,6 +48,14 @@ #include #include +#ifdef HAVE_TESSERACT +#if !defined(USE_STD_NAMESPACE) +#define USE_STD_NAMESPACE +#endif +#include +#include +#endif + namespace cv { namespace text diff --git a/modules/text/src/precomp.hpp b/modules/text/src/precomp.hpp index 7ccda150f..17a6427b1 100644 --- a/modules/text/src/precomp.hpp +++ b/modules/text/src/precomp.hpp @@ -47,12 +47,4 @@ #include "text_config.hpp" -#ifdef HAVE_TESSERACT -#if !defined(USE_STD_NAMESPACE) -#define USE_STD_NAMESPACE -#endif -#include -#include -#endif - #endif