mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
fix: add link_directories for tesseract/leptonica on macOS (#2186)
pkg_check_modules provides library names without paths. Without link_directories, the linker cannot find tesseract and leptonica on systems where they are not in default search paths (e.g. Homebrew on macOS arm64). Co-authored-by: Dhanush Varma <your@email.com>
This commit is contained in:
@@ -208,7 +208,9 @@ if (PKG_CONFIG_FOUND AND WITH_OCR)
|
||||
pkg_check_modules (LEPTONICA REQUIRED lept)
|
||||
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${TESSERACT_LIBRARIES})
|
||||
link_directories(${TESSERACT_LIBRARY_DIRS})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${LEPTONICA_LIBRARIES})
|
||||
link_directories(${LEPTONICA_LIBRARY_DIRS})
|
||||
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_OCR")
|
||||
endif (PKG_CONFIG_FOUND AND WITH_OCR)
|
||||
@@ -243,7 +245,9 @@ if (PKG_CONFIG_FOUND AND WITH_HARDSUBX)
|
||||
pkg_check_modules (LEPTONICA REQUIRED lept)
|
||||
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${TESSERACT_LIBRARIES})
|
||||
link_directories(${TESSERACT_LIBRARY_DIRS})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${LEPTONICA_LIBRARIES})
|
||||
link_directories(${LEPTONICA_LIBRARY_DIRS})
|
||||
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${TESSERACT_INCLUDE_DIRS})
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${LEPTONICA_INCLUDE_DIRS})
|
||||
|
||||
Reference in New Issue
Block a user