another improvement for ca0be2fb72

This commit is contained in:
Zdenko Podobný 2019-05-17 11:04:42 +02:00
parent e92a424efa
commit 5282cdf7be

View File

@ -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()