aboutsummaryrefslogtreecommitdiff
path: root/ports/protobuf/fix-android-log.patch
diff options
context:
space:
mode:
authorPascal Thomet <pthomet@gmail.com>2020-05-08 23:48:03 +0200
committerGitHub <noreply@github.com>2020-05-08 14:48:03 -0700
commitfcdac2dc15122d30e08cf9c71ae2e0e6b466f1a6 (patch)
tree3f24a6998a931b4955fdf7e6e6818dd41e7afb3f /ports/protobuf/fix-android-log.patch
parent57e65ee144d3cf2e046eab7a4ac7be2150fd6f19 (diff)
downloadvcpkg-fcdac2dc15122d30e08cf9c71ae2e0e6b466f1a6.tar.gz
vcpkg-fcdac2dc15122d30e08cf9c71ae2e0e6b466f1a6.zip
[protobuf] Correct protobuf under android (Fix issue #8218) (#11228)
* Correct protobuf under android (Fix issue #8218) - This fixes https://github.com/microsoft/vcpkg/issues/8218 The original error is linkely inside protobuf CMakeLists, which should link the log library under Android. See explanations here: https://github.com/protocolbuffers/protobuf/issues/2719 * ports/protobuf/CONTROL: Version 3.11.4-1
Diffstat (limited to 'ports/protobuf/fix-android-log.patch')
-rw-r--r--ports/protobuf/fix-android-log.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/ports/protobuf/fix-android-log.patch b/ports/protobuf/fix-android-log.patch
new file mode 100644
index 000000000..47a935078
--- /dev/null
+++ b/ports/protobuf/fix-android-log.patch
@@ -0,0 +1,28 @@
+diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake
+index 6bf86a277..424854798 100644
+--- a/cmake/libprotobuf-lite.cmake
++++ b/cmake/libprotobuf-lite.cmake
+@@ -67,6 +67,9 @@ target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT})
+ if(protobuf_LINK_LIBATOMIC)
+ target_link_libraries(libprotobuf-lite atomic)
+ endif()
++if(${CMAKE_SYSTEM_NAME} STREQUAL "Android")
++ target_link_libraries(libprotobuf-lite log)
++endif()
+ target_include_directories(libprotobuf-lite PUBLIC ${protobuf_source_dir}/src)
+ if(MSVC AND protobuf_BUILD_SHARED_LIBS)
+ target_compile_definitions(libprotobuf-lite
+diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake
+index 0c12596c2..a5be494fb 100644
+--- a/cmake/libprotobuf.cmake
++++ b/cmake/libprotobuf.cmake
+@@ -121,6 +121,9 @@ endif()
+ if(protobuf_LINK_LIBATOMIC)
+ target_link_libraries(libprotobuf atomic)
+ endif()
++if(${CMAKE_SYSTEM_NAME} STREQUAL "Android")
++ target_link_libraries(libprotobuf log)
++endif()
+ target_include_directories(libprotobuf PUBLIC ${protobuf_source_dir}/src)
+ if(MSVC AND protobuf_BUILD_SHARED_LIBS)
+ target_compile_definitions(libprotobuf