aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/protobuf/CONTROL4
-rw-r--r--ports/protobuf/fix-static-build.patch13
-rw-r--r--ports/protobuf/portfile.cmake1
3 files changed, 16 insertions, 2 deletions
diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL
index 1b8551bf5..5a72ae6fb 100644
--- a/ports/protobuf/CONTROL
+++ b/ports/protobuf/CONTROL
@@ -1,8 +1,8 @@
Source: protobuf
-Version: 3.12.0
+Version: 3.12.0-1
Homepage: https://github.com/google/protobuf
Description: Protocol Buffers - Google's data interchange format
Feature: zlib
Description: ZLib based features like Gzip streams
-Build-Depends: zlib \ No newline at end of file
+Build-Depends: zlib
diff --git a/ports/protobuf/fix-static-build.patch b/ports/protobuf/fix-static-build.patch
new file mode 100644
index 000000000..22d99435c
--- /dev/null
+++ b/ports/protobuf/fix-static-build.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/install.cmake b/cmake/install.cmake
+index be47c54..8b1bd97 100644
+--- a/cmake/install.cmake
++++ b/cmake/install.cmake
+@@ -31,7 +31,7 @@ endforeach()
+ if (protobuf_BUILD_PROTOC_BINARIES)
+ install(TARGETS protoc EXPORT protobuf-targets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+- if (UNIX AND NOT APPLE)
++ if (UNIX AND NOT APPLE AND NOT protobuf_MSVC_STATIC_RUNTIME)
+ set_property(TARGET protoc
+ PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
+ elseif (APPLE)
diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake
index 230e0b9cd..8ddd9fe23 100644
--- a/ports/protobuf/portfile.cmake
+++ b/ports/protobuf/portfile.cmake
@@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
fix-uwp.patch
fix-android-log.patch
+ fix-static-build.patch
)
if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x86")