mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 15:59:01 +08:00
Merge pull request #1270 from traversaro/fix-dynamic-protobuf
Fix protobuf dynamic build
This commit is contained in:
commit
f8f3525530
13
ports/protobuf/0001-fix-missing-export.patch
Normal file
13
ports/protobuf/0001-fix-missing-export.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h
|
||||
index 4417446..a7154b4 100644
|
||||
--- a/src/google/protobuf/generated_message_util.h
|
||||
+++ b/src/google/protobuf/generated_message_util.h
|
||||
@@ -164,7 +164,7 @@ class ExplicitlyConstructed {
|
||||
|
||||
// Default empty string object. Don't use this directly. Instead, call
|
||||
// GetEmptyString() to get the reference.
|
||||
-extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
|
||||
+LIBPROTOBUF_EXPORT extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
|
||||
LIBPROTOBUF_EXPORT extern ProtobufOnceType empty_string_once_init_;
|
||||
LIBPROTOBUF_EXPORT void InitEmptyString();
|
||||
|
@ -17,6 +17,15 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION})
|
||||
set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32)
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
# Patch to fix the missing export of fixed_address_empty_string,
|
||||
# see https://github.com/google/protobuf/pull/3216
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-missing-export.patch"
|
||||
)
|
||||
|
||||
|
||||
vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH})
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
|
Loading…
Reference in New Issue
Block a user