From 44788add01044160962f7b93e390a18c873d424d Mon Sep 17 00:00:00 2001 From: Zhao Liu Date: Wed, 26 Jul 2023 19:05:17 -0700 Subject: [PATCH] Fix build error --- src/CMakeLists.txt | 6 +++--- src/SyncClient.cpp | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e39ce1f..b37ac5c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -22,7 +22,7 @@ use_cxx(etcd-cpp-api-core-objects) add_dependencies(etcd-cpp-api-core-objects protobuf_generates) include_generated_protobuf_files(etcd-cpp-api-core-objects) target_link_libraries(etcd-cpp-api-core-objects PUBLIC - ${PROTOBUF_LIBRARIES} + protobuf::libprotobuf ${OPENSSL_LIBRARIES} ${GRPC_LIBRARIES} ) @@ -32,7 +32,7 @@ if(BUILD_ETCD_CORE_ONLY) add_library(etcd-cpp-api-core $) use_cxx(etcd-cpp-api-core) target_link_libraries(etcd-cpp-api-core PUBLIC - ${PROTOBUF_LIBRARIES} + protobuf::libprotobuf ${OPENSSL_LIBRARIES} ${GRPC_LIBRARIES} ) @@ -44,7 +44,7 @@ else() use_cxx(etcd-cpp-api) target_link_libraries(etcd-cpp-api PUBLIC ${CPPREST_LIB} # n.b.: the asynchronous client requires pplx in cpprestsdk - ${PROTOBUF_LIBRARIES} + protobuf::libprotobuf ${OPENSSL_LIBRARIES} ${GRPC_LIBRARIES} ) diff --git a/src/SyncClient.cpp b/src/SyncClient.cpp index d5a4179..7625514 100644 --- a/src/SyncClient.cpp +++ b/src/SyncClient.cpp @@ -4,6 +4,10 @@ #define NOMINMAX #endif +#ifdef __ANDROID__ +#include +#endif + #include #include #include