[tesseract] Automatically link ws2_32 to prevent missing symbol issues in clients.

This commit is contained in:
Robert Schumacher 2018-03-30 14:43:42 -07:00
parent f9d4692749
commit 0842b6c327
3 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,4 @@
Source: tesseract
Version: 3.05.01-2
Version: 3.05.01-3
Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.
Build-Depends: leptonica, icu

View File

@ -17,6 +17,7 @@ vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-icu.patch
${CMAKE_CURRENT_LIST_DIR}/ws2-32.patch
)
# The built-in cmake FindICU is better

View File

@ -0,0 +1,12 @@
diff --git a/viewer/svutil.cpp b/viewer/svutil.cpp
index 34a2286..bc2a7e1 100644
--- a/viewer/svutil.cpp
+++ b/viewer/svutil.cpp
@@ -23,6 +23,7 @@
#include <stdio.h>
#ifdef _WIN32
#include <windows.h>
+#pragma comment(lib, "Ws2_32.lib")
struct addrinfo {
struct sockaddr* ai_addr;
int ai_addrlen;