diff --git a/CMakeLists.txt b/CMakeLists.txt index 83dd702b..fa98e0e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,7 +151,7 @@ if(CPPAN_BUILD) add_subdirectory(.cppan) else() find_package(PkgConfig) - if(PKG_CONFIG_EXECUTABLE) + if(PKG_CONFIG_EXECUTABLE and NOT Leptonica_DIR) pkg_check_modules(Leptonica REQUIRED lept>=${MINIMUM_LEPTONICA_VERSION}) link_directories(${Leptonica_LIBRARY_DIRS}) else()