FindTesseract.cmake 641 B

123456789101112131415161718192021222324
  1. # Tesseract OCR
  2. ocv_check_modules(Tesseract tesseract) # lept is excluded (not a direct dependency)
  3. if(NOT Tesseract_FOUND)
  4. find_path(Tesseract_INCLUDE_DIR tesseract/baseapi.h
  5. HINTS
  6. /usr/include
  7. /usr/local/include)
  8. find_library(Tesseract_LIBRARY NAMES tesseract
  9. HINTS
  10. /usr/lib
  11. /usr/local/lib)
  12. find_library(Lept_LIBRARY NAMES lept
  13. HINTS
  14. /usr/lib
  15. /usr/local/lib)
  16. if(Tesseract_INCLUDE_DIR AND Tesseract_LIBRARY AND Lept_LIBRARY)
  17. set(Tesseract_INCLUDE_DIRS ${Tesseract_INCLUDE_DIR})
  18. set(Tesseract_LIBRARIES ${Tesseract_LIBRARY} ${Lept_LIBRARY})
  19. set(Tesseract_FOUND 1)
  20. endif()
  21. endif()