Build OpenCV with Tesseract

hi, I want to build opencv-4.5.4 + Tesseract-5 with cmake

[img1]

(1) i downloaded this file (64 bit) :
Binaries > Tesseract installer for Windows > tesseract-ocr-w64-setup-v5.0.0-rc1.20211030.exe
but i don’t know how set these 3 inputs [ see img1 ] :

  1. Tesseract_DIR
  2. Tesseract_INCLUDE_DIR
  3. Tesseract_LIBRARY

[img2]

(2) i went to this link [ Compilation guide for various platforms ] and build tesseract from this method [ For visual studio project using tesseract ] —> after build end —> this is result :

[img3]

i set these 3 inputs [ see img1 ] like this :

  1. Tesseract_DIR :
    empty!
  2. Tesseract_INCLUDE_DIR :
    C:\Users\mahdi\vcpkg\installed\Tesseract-x64-windows\include
  3. Tesseract_LIBRARY :
    C:\Users\mahdi\vcpkg\installed\Tesseract-x64-windows\lib

after press configure button [ in cmake ] → i saw Tesseract not installed! :

How can I solve this problem? I want to build opencv with Tesseract but I can’t :frowning:

k i found answer :expressionless:
i added tesseract paths to Environment Variables :

Then I restarted cmake, Then I deleted [ cleaned ] these 3 inputs [see img1]
then press Configure button in cmake, Tesseract found! :expressionless: