diff options
| -rw-r--r-- | ports/protobuf/CONTROL | 2 | ||||
| -rw-r--r-- | ports/protobuf/fix-android-log.patch | 28 | ||||
| -rw-r--r-- | ports/protobuf/portfile.cmake | 1 |
3 files changed, 30 insertions, 1 deletions
diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index fee21f7b9..2385d6e32 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.11.4 +Version: 3.11.4-1 Homepage: https://github.com/google/protobuf Description: Protocol Buffers - Google's data interchange format 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 diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 4eec0669b..a5e9252ad 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-uwp.patch + fix-android-log.patch ) if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x86") |
