71 lines
2.9 KiB
Diff
71 lines
2.9 KiB
Diff
diff -rupN --no-dereference tesseract-5.2.0/CMakeLists.txt tesseract-5.2.0-new/CMakeLists.txt
|
|
--- tesseract-5.2.0/CMakeLists.txt 2022-07-06 22:15:49.000000000 +0200
|
|
+++ tesseract-5.2.0-new/CMakeLists.txt 2022-07-07 09:35:17.943005144 +0200
|
|
@@ -336,7 +336,7 @@ elseif(UNIX)
|
|
set(LIB_pthread pthread)
|
|
endif()
|
|
elseif(WIN32)
|
|
- set(LIB_Ws2_32 Ws2_32)
|
|
+ set(LIB_Ws2_32 ws2_32)
|
|
endif()
|
|
|
|
add_definitions("-DCMAKE_BUILD")
|
|
@@ -807,11 +807,14 @@ set_target_properties(libtesseract
|
|
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()
|
|
@@ -926,9 +929,9 @@ install(
|
|
|
|
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()
|
|
|
|
# ##############################################################################
|
|
diff -rupN --no-dereference tesseract-5.2.0/src/training/CMakeLists.txt tesseract-5.2.0-new/src/training/CMakeLists.txt
|
|
--- tesseract-5.2.0/src/training/CMakeLists.txt 2022-07-06 22:15:49.000000000 +0200
|
|
+++ tesseract-5.2.0-new/src/training/CMakeLists.txt 2022-07-07 09:35:17.943005144 +0200
|
|
@@ -108,7 +108,7 @@ if(NOT DISABLED_LEGACY_ENGINE)
|
|
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)
|
|
@@ -242,7 +242,7 @@ if(ICU_FOUND)
|
|
|
|
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)
|
|
@@ -361,7 +361,7 @@ if(ICU_FOUND)
|
|
|
|
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
|