[poco] Fix embedded copy of pcre in static linking mode. Fixes #2685.

This commit is contained in:
Robert Schumacher 2018-01-31 11:34:25 -08:00
parent 01e327ba9f
commit ce93af9972
3 changed files with 29 additions and 1 deletions

View File

@ -1,5 +1,5 @@
Source: poco
Version: 1.8.1
Version: 1.8.1-1
Build-Depends: zlib, pcre, sqlite3, expat
Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems.

View File

@ -0,0 +1,27 @@
diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
index d47ced2..ddead59 100644
--- a/Foundation/CMakeLists.txt
+++ b/Foundation/CMakeLists.txt
@@ -48,6 +48,22 @@ if (POCO_UNBUNDLED)
add_definitions(-DPOCO_UNBUNDLED)
+ add_definitions(
+ -D_pcre_utf8_table1=_poco_pcre_utf8_table1
+ -D_pcre_utf8_table1_size=_poco_pcre_utf8_table1_size
+ -D_pcre_utf8_table2=_poco_pcre_utf8_table2
+ -D_pcre_utf8_table3=_poco_pcre_utf8_table3
+ -D_pcre_utf8_table4=_poco_pcre_utf8_table4
+ -D_pcre_utt_names=_poco_pcre_utt_names
+ -D_pcre_utt=_poco_pcre_utt
+ -D_pcre_utt_size=_poco_pcre_utt_size
+ -D_pcre_OP_lengths=_poco_pcre_OP_lengths
+ -D_pcre_hspace_list=_poco_pcre_hspace_list
+ -D_pcre_vspace_list=_poco_pcre_vspace_list
+ -D_pcre_ucp_gentype=_poco_pcre_ucp_gentype
+ -D_pcre_ucp_gbtable=_poco_pcre_ucp_gbtable
+ )
+
else()
# pcre
POCO_SOURCES( SRCS pcre

View File

@ -14,6 +14,7 @@ vcpkg_apply_patches(
${CMAKE_CURRENT_LIST_DIR}/config_h.patch
${CMAKE_CURRENT_LIST_DIR}/find_pcre.patch
${CMAKE_CURRENT_LIST_DIR}/foundation-public-include-pcre.patch
${CMAKE_CURRENT_LIST_DIR}/fix-static-internal-pcre.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC)