File tree 2 files changed +50
-1
lines changed
2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ set(VERSION_MAJOR 3)
44
44
set (VERSION_MINOR 05)
45
45
set (VERSION_PLAIN ${VERSION_MAJOR} .${VERSION_MINOR} )
46
46
47
- find_package (Leptonica 1.72 REQUIRED)
47
+ find_package (Leptonica 1.71 REQUIRED)
48
48
49
49
find_package (ICU COMPONENTS uc i18n)
50
50
find_package (PkgConfig QUIET )
Original file line number Diff line number Diff line change
1
+ #
2
+ # Find Leptonica
3
+ #
4
+ # Exported variables:
5
+ # Leptonica_FOUND
6
+ # Leptonica_INCLUDE_DIRS
7
+ # Leptonica_LIBRARIES
8
+ #
9
+ # Leptonica_VERSION
10
+ # Leptonica_MAJOR_VERSION
11
+ # Leptonica_MINOR_VERSION
12
+ #
13
+
14
+ find_path (Leptonica_INCLUDE_DIR leptonica/allheaders.h
15
+ HINTS
16
+ /usr/include
17
+ /usr/local/include
18
+ /opt/include
19
+ /opt/local/include
20
+ )
21
+ if (NOT Leptonica_INCLUDE_DIR-NOTFOUND )
22
+ set (Leptonica_INCLUDE_DIRS ${Leptonica_INCLUDE_DIR} /leptonica)
23
+ file (STRINGS ${Leptonica_INCLUDE_DIRS} /allheaders.h Leptonica_MAJOR_VERSION REGEX "LIBLEPT_MAJOR_VERSION" )
24
+ file (STRINGS ${Leptonica_INCLUDE_DIRS} /allheaders.h Leptonica_MINOR_VERSION REGEX "LIBLEPT_MINOR_VERSION" )
25
+ string (REGEX MATCH "[0-9]+" Leptonica_MAJOR_VERSION ${Leptonica_MAJOR_VERSION} )
26
+ string (REGEX MATCH "[0-9]+" Leptonica_MINOR_VERSION ${Leptonica_MINOR_VERSION} )
27
+ set (Leptonica_VERSION ${Leptonica_MAJOR_VERSION} .${Leptonica_MINOR_VERSION} )
28
+ endif ()
29
+
30
+ find_library (Leptonica_LIBRARY NAMES lept liblept
31
+ HINTS
32
+ /usr/lib
33
+ /usr/local/lib
34
+ /opt/lib
35
+ /opt/local/lib
36
+ )
37
+ set (Leptonica_LIBRARIES ${Leptonica_LIBRARY} )
38
+
39
+ include (FindPackageHandleStandardArgs)
40
+
41
+ find_package_handle_standard_args(Leptonica
42
+ REQUIRED_VARS
43
+ Leptonica_INCLUDE_DIRS
44
+ Leptonica_LIBRARIES
45
+ VERSION_VAR Leptonica_VERSION
46
+ )
47
+
48
+ mark_as_advanced (Leptonica_INCLUDE_DIRS Leptonica_LIBRARIES)
49
+
You can’t perform that action at this time.
0 commit comments