diff --git a/CMakeLists.txt b/CMakeLists.txt index bd0a59381..44b4ac5dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,7 @@ set(MINIMUM_LEPTONICA_VERSION 1.71) if (NOT Leptonica_BUILD_DIR) find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED) else() +set(Leptonica_DIR ${Leptonica_BUILD_DIR}) find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED CONFIG) endif()