aboutsummaryrefslogtreecommitdiff
path: root/ports/protobuf/fix-android-log.patch
blob: 47a935078e1de0b43a182c8eaccf8491f29d26d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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