From ad0ceb041a9f7f416da38310b8be4a6e77620dfe Mon Sep 17 00:00:00 2001 From: zdenop Date: Wed, 30 Aug 2023 14:22:29 +0200 Subject: [PATCH] fix build with leptonica >=1.82 --- ccmain/cube_control.cpp | 4 ++++ cube/cube_line_object.h | 4 ++++ cube/cube_line_segmenter.h | 4 ++++ cube/cube_utils.h | 4 ++++ textord/devanagari_processing.cpp | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/ccmain/cube_control.cpp b/ccmain/cube_control.cpp index 50f7512d..5da900a5 100644 --- a/ccmain/cube_control.cpp +++ b/ccmain/cube_control.cpp @@ -23,6 +23,10 @@ #endif #include "allheaders.h" +#if (LIBLEPT_MAJOR_VERSION > 1) || (LIBLEPT_MINOR_VERSION > 82) + // The public API of Leptonica 1.83.0 hides details of some data + #include +#endif #include "cube_object.h" #include "cube_reco_context.h" diff --git a/cube/cube_line_object.h b/cube/cube_line_object.h index 037ae6b6..85b9cda9 100644 --- a/cube/cube_line_object.h +++ b/cube/cube_line_object.h @@ -27,6 +27,10 @@ #include "cube_reco_context.h" #include "cube_object.h" #include "allheaders.h" +#if (LIBLEPT_MAJOR_VERSION > 1) || (LIBLEPT_MINOR_VERSION > 82) + // The public API of Leptonica 1.83.0 hides details of some data + #include +#endif namespace tesseract { class CubeLineObject { diff --git a/cube/cube_line_segmenter.h b/cube/cube_line_segmenter.h index 43d19e57..fefc4fb1 100644 --- a/cube/cube_line_segmenter.h +++ b/cube/cube_line_segmenter.h @@ -28,6 +28,10 @@ #include "cube_reco_context.h" #include "allheaders.h" +#if (LIBLEPT_MAJOR_VERSION > 1) || (LIBLEPT_MINOR_VERSION > 82) + // The public API of Leptonica 1.83.0 hides details of some data + #include +#endif namespace tesseract { diff --git a/cube/cube_utils.h b/cube/cube_utils.h index 765012cd..2a874044 100644 --- a/cube/cube_utils.h +++ b/cube/cube_utils.h @@ -30,6 +30,10 @@ #include "const.h" #include "char_set.h" #include "char_samp.h" +#if (LIBLEPT_MAJOR_VERSION > 1) || (LIBLEPT_MINOR_VERSION > 82) + // The public API of Leptonica 1.83.0 hides details of some data + #include +#endif namespace tesseract { class CubeUtils { diff --git a/textord/devanagari_processing.cpp b/textord/devanagari_processing.cpp index 320c6ce0..0171ed99 100644 --- a/textord/devanagari_processing.cpp +++ b/textord/devanagari_processing.cpp @@ -26,6 +26,10 @@ #include "allheaders.h" #include "tordmain.h" #include "statistc.h" +#if (LIBLEPT_MAJOR_VERSION > 1) || (LIBLEPT_MINOR_VERSION > 82) + // The public API of Leptonica 1.83.0 hides details of some data + #include +#endif // Flags controlling the debugging information for shiro-rekha splitting // strategies.