Hello.


I'm *desperately* trying to compile Tesseract-ocr (4.0) on a Windows 
Machine with some restrictions.

   - We are doing multi-platforms : an automated compilation must be 
   possible (command-line)
   - We are using specific 3rd party libraries : the compilation must 
   accept custom path / libraries for most of its dependencies
   - We are already using most of the 3rd party libraries for other part of 
   the code : the compilation must not recompile them (thus, no cppan)
   - Leptonica has been built with our special 3rdparty (ZLib, LibPng ..)
   - Our project must "include" tesseract alongside theses specific 3rdparty
   
Problem :

I have strong issue specifying custom paths for Tesseract. Under Unix 
(CentOS, Ubuntu 16/18, Debian 8/9 ..), I was able to achieve my goal with 
the tools *autogen* *autoconf* *autoheaders* *pkg-config*.

Under Windows, autoconf-archive and pkg-config are unavailable (from what I 
know) ; making autoconf unusable. I was neither able to compile using CMake 
and specifying a custom path for Leptonica.


Under Linux :


   1. Merging libraries ZLib/LibPng/LibTiff/LibJpeg with Leptonica (ar)
   2. Creating a modified pkg-config with the path to this modified 
   liblept.a
   3. autogen.sh
   4. LIBLEPT_HEADERSDIR=`pwd`/Leptonica/include ./configure 
   --prefix=`pwd`/install --with-extra-libraries=PATH/TO/LEPTONICA 
   PKG_CONFIG_PATH=PATH/TO/PKG LDFLAGS="-LPATH/TO/LEPTONICA" 
   CPPFLAGS="-IPATH/TO/ZLIB -IPATH/TO/LIBPNG ..."
   5. make


Under Windows :


   1. Trying with pkg-config : installation of pkg-config with mingw failed
   2. Trying with cppan + cmake visual studio : could not figure how to 
   separate cppan from tesseract in the project
   3. Trying with cmake, CMAKE_PREFIX_PATH, CMAKE_MODULE_PATH, 
   Leptonica_DIR : missing config files from Leptonica (LeptonicaConfig.cmake 
   or leptonica-config.cmake)
   4. Trying under Linux Ubuntu 16 with gcc-mingw-w64 : failed to link 
   against tesseract and leptonica libraries under Windows (new Visual 
   project) 


I can detail any of theses steps if you need further information.


Is there any way to simply specify the path to Leptonica include/lib with 
cmake ?

Is there any restriction for the compilation to look only for an include 
folder and a library ?

Did you planned users to compile with non-default libraries ? 


Thank you in advance.

Arnaud LOYER.

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/b5b25079-1823-4e89-9901-d52e7d771eca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to