mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Enable building with OCR support in Ubuntu environment
This commit is contained in:
parent
7ec95e33eb
commit
27aed79305
|
|
@ -16,8 +16,19 @@ endif()
|
|||
|
||||
# --- Check optional OCR dependencies ---
|
||||
|
||||
find_package(Leptonica)
|
||||
find_package(Tesseract)
|
||||
find_package(Leptonica QUIET)
|
||||
find_package(Tesseract QUIET)
|
||||
|
||||
if(OS_LINUX AND NOT Leptonica_FOUND)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_check_modules(Tesseract IMPORTED_TARGET tesseract lept)
|
||||
if(Tesseract_FOUND)
|
||||
add_library(Tesseract::libtesseract ALIAS PkgConfig::Tesseract)
|
||||
set(Leptonica_FOUND TRUE)
|
||||
set(Tesseract_FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- End of section ---
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user