File tree 2 files changed +49
-1
lines changed
2 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ set(Leptonica_DIR ${Leptonica_BUILD_DIR})
53
53
find_package (Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED CONFIG)
54
54
endif ()
55
55
56
- find_package (ICU COMPONENTS uc i18n)
57
56
find_package (OpenCL QUIET )
58
57
find_package (PkgConfig)
59
58
@@ -220,6 +219,7 @@ set(tesseractmain_src
220
219
)
221
220
add_executable (tesseractmain ${tesseractmain_src} )
222
221
target_link_libraries (tesseractmain tesseract)
222
+ set_target_properties (tesseractmain PROPERTIES OUTPUT_NAME tesseract)
223
223
224
224
########################################
225
225
Original file line number Diff line number Diff line change 4
4
5
5
if (STATIC OR NOT (WIN32 OR CYGWIN ))
6
6
7
+ # experimental
8
+ if (MSVC )
9
+
10
+ include (CheckTypeSize)
11
+ check_type_size("void *" SIZEOF_VOID_P)
12
+
13
+ if (SIZEOF_VOID_P EQUAL 8)
14
+ set (X64 1)
15
+ set (ARCH_DIR_NAME 64)
16
+ elseif (SIZEOF_VOID_P EQUAL 4)
17
+ set (X86 1)
18
+ set (ARCH_DIR_NAME 32)
19
+ else ()
20
+ message (FATAL_ERROR "Cannot determine target architecture" )
21
+ endif ()
22
+
23
+ set (icu_dir "${CMAKE_CURRENT_BINARY_DIR} /icu" )
24
+ set (icu_archive "${icu_dir} /icu${ARCH_DIR_NAME} .zip" )
25
+
26
+ if (X86)
27
+ set (icu_hash 45167a240b60e36b59a87eda23490ce4)
28
+ else ()
29
+ set (icu_hash 480c72491576c048de1218c3c5519399)
30
+ endif ()
31
+
32
+ message (STATUS "Downloading latest ICU binaries" )
33
+
34
+ file (DOWNLOAD
35
+ "http://download.icu-project.org/files/icu4c/56.1/icu4c-56_1-Win${ARCH_DIR_NAME} -msvc10.zip"
36
+ "${icu_archive} "
37
+ SHOW_PROGRESS
38
+ EXPECTED_HASH MD5=${icu_hash}
39
+ )
40
+ execute_process (COMMAND ${CMAKE_COMMAND} -E tar xz "${icu_archive} "
41
+ WORKING_DIRECTORY "${icu_dir} "
42
+ RESULT_VARIABLE __result
43
+ )
44
+ if (NOT __result EQUAL 0)
45
+ message (FATAL_ERROR "error ${__result} " )
46
+ endif ()
47
+
48
+ set (ICU_ROOT ${icu_dir} /icu)
49
+
50
+ endif (MSVC )
51
+ # experimental
52
+
53
+ find_package (ICU COMPONENTS uc i18n)
54
+
7
55
########################################
8
56
# LIBRARY tessopt
9
57
########################################
You can’t perform that action at this time.
0 commit comments