diff --git a/CMakeLists.txt b/CMakeLists.txt index 662026f227..86874c7915 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,7 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.cppan) if (NOT Leptonica_DIR AND NOT MSVC) find_package(PkgConfig REQUIRED) pkg_check_modules(Leptonica REQUIRED lept>=${MINIMUM_LEPTONICA_VERSION}) + link_directories(${Leptonica_LIBRARY_DIRS}) else() find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED CONFIG) endif()