2022-12-23 15:02:49 +00:00
|
|
|
diff -rupN --no-dereference tesseract-5.3.0/CMakeLists.txt tesseract-5.3.0-new/CMakeLists.txt
|
|
|
|
--- tesseract-5.3.0/CMakeLists.txt 2022-12-22 14:57:57.000000000 +0100
|
|
|
|
+++ tesseract-5.3.0-new/CMakeLists.txt 2022-12-23 10:33:09.303707322 +0100
|
|
|
|
@@ -345,7 +345,7 @@ elseif(UNIX)
|
2022-03-09 21:24:34 +00:00
|
|
|
set(LIB_pthread pthread)
|
|
|
|
endif()
|
|
|
|
elseif(WIN32)
|
|
|
|
- set(LIB_Ws2_32 Ws2_32)
|
|
|
|
+ set(LIB_Ws2_32 ws2_32)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_definitions("-DCMAKE_BUILD")
|
2022-12-23 15:02:49 +00:00
|
|
|
@@ -812,11 +812,14 @@ set_target_properties(libtesseract
|
2022-03-09 21:24:34 +00:00
|
|
|
set_target_properties(libtesseract
|
|
|
|
PROPERTIES SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
|
|
|
|
|
|
|
-if(WIN32)
|
|
|
|
+if(MSVC)
|
|
|
|
set_target_properties(libtesseract
|
|
|
|
PROPERTIES OUTPUT_NAME tesseract${VERSION_MAJOR}${VERSION_MINOR})
|
|
|
|
set_target_properties(libtesseract
|
|
|
|
PROPERTIES DEBUG_OUTPUT_NAME tesseract${VERSION_MAJOR}${VERSION_MINOR}d)
|
|
|
|
+elseif(MINGW)
|
|
|
|
+ set_target_properties(libtesseract PROPERTIES SUFFIX "-${VERSION_MAJOR}${VERSION_MINOR}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
|
|
|
+ set_target_properties(libtesseract PROPERTIES OUTPUT_NAME tesseract)
|
|
|
|
else()
|
|
|
|
set_target_properties(libtesseract PROPERTIES OUTPUT_NAME tesseract)
|
|
|
|
endif()
|
2022-12-23 15:02:49 +00:00
|
|
|
@@ -931,9 +934,9 @@ install(
|
2022-03-09 21:24:34 +00:00
|
|
|
|
|
|
|
if(INSTALL_CONFIGS)
|
|
|
|
install(FILES ${TESSERACT_CONFIGS}
|
|
|
|
- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/tessdata/configs)
|
|
|
|
+ DESTINATION ${TESSDATA_PREFIX}/tessdata/configs)
|
|
|
|
install(FILES ${TESSERACT_TESSCONFIGS}
|
|
|
|
- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/tessdata/tessconfigs)
|
|
|
|
+ DESTINATION ${TESSDATA_PREFIX}/tessdata/tessconfigs)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# ##############################################################################
|
2022-12-23 15:02:49 +00:00
|
|
|
diff -rupN --no-dereference tesseract-5.3.0/src/training/CMakeLists.txt tesseract-5.3.0-new/src/training/CMakeLists.txt
|
|
|
|
--- tesseract-5.3.0/src/training/CMakeLists.txt 2022-12-22 14:57:57.000000000 +0100
|
|
|
|
+++ tesseract-5.3.0-new/src/training/CMakeLists.txt 2022-12-23 10:33:09.303707322 +0100
|
|
|
|
@@ -115,7 +115,7 @@ if(NOT DISABLED_LEGACY_ENGINE)
|
2022-03-11 10:30:12 +00:00
|
|
|
common/trainingsampleset.h)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
-add_library(common_training ${COMMON_TRAINING_SRC})
|
|
|
|
+add_library(common_training STATIC ${COMMON_TRAINING_SRC})
|
|
|
|
target_include_directories(common_training PUBLIC common
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
target_link_libraries(common_training PUBLIC libtesseract)
|
2022-12-23 15:02:49 +00:00
|
|
|
@@ -254,7 +254,7 @@ if(ICU_FOUND)
|
2022-03-11 10:30:12 +00:00
|
|
|
|
|
|
|
file(GLOB unicharset_training_src unicharset/*)
|
|
|
|
|
|
|
|
- add_library(unicharset_training ${unicharset_training_src})
|
|
|
|
+ add_library(unicharset_training STATIC ${unicharset_training_src})
|
|
|
|
if(SW_BUILD)
|
|
|
|
target_link_libraries(unicharset_training
|
|
|
|
PUBLIC common_training org.sw.demo.unicode.icu.i18n)
|
2022-12-23 15:02:49 +00:00
|
|
|
@@ -378,7 +378,7 @@ if(ICU_FOUND)
|
2022-03-11 10:30:12 +00:00
|
|
|
|
|
|
|
file(GLOB pango_training_src pango/*)
|
|
|
|
|
|
|
|
- add_library(pango_training ${pango_training_src})
|
|
|
|
+ add_library(pango_training STATIC ${pango_training_src})
|
|
|
|
target_link_libraries(pango_training PUBLIC unicharset_training)
|
|
|
|
if(SW_BUILD)
|
|
|
|
target_link_libraries(pango_training
|