Skip to content

Commit b48abd8

Browse files
committed
Improve leptonica search.
1 parent 0970227 commit b48abd8

File tree

2 files changed

+3
-54
lines changed

2 files changed

+3
-54
lines changed

CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ set(VERSION_PLAIN ${VERSION_MAJOR}.${VERSION_MINOR})
4646

4747
set(MINIMUM_LEPTONICA_VERSION 1.71)
4848

49-
if (NOT Leptonica_DIR)
50-
find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED)
49+
if (NOT Leptonica_DIR AND NOT MSVC)
50+
find_package(PkgConfig REQUIRED)
51+
pkg_check_modules(Leptonica REQUIRED lept)
5152
else()
5253
find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED CONFIG)
5354
endif()

cmake/FindLeptonica.cmake

-52
This file was deleted.

0 commit comments

Comments
 (0)