diff --git a/native/android/app/CMakeLists.txt b/native/android/app/CMakeLists.txt --- a/native/android/app/CMakeLists.txt +++ b/native/android/app/CMakeLists.txt @@ -150,7 +150,12 @@ file(GLOB DOUBLE_CONVERSION_SOURCES "${_third_party_dir}/double-conversion/double-conversion/*.cc" ) -file(GLOB GRPC_CODE "../../../shared/protos/_generated/*.cc") + +add_library(gRPC::grpc++ ALIAS grpc++) +add_subdirectory(../../../shared/protos + ${CMAKE_CURRENT_BINARY_DIR}/protos + EXCLUDE_FROM_ALL +) add_library( # Sets the name of the library. @@ -195,8 +200,6 @@ # double-conversion ${DOUBLE_CONVERSION_SOURCES} - ${GRPC_CODE} - # comm code ${ANDROID_NATIVE_CODE} ${COMMON_NATIVE_CODE} @@ -259,6 +262,7 @@ grpc++ libprotobuf comm::native_rust_library + comm-tunnelbroker-grpc ) # add a dummy library which is required by CallInvokerHolderImpl.java diff --git a/shared/protos/CMakeLists.txt b/shared/protos/CMakeLists.txt --- a/shared/protos/CMakeLists.txt +++ b/shared/protos/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.4) include(GNUInstallDirs) -find_package(Protobuf REQUIRED) -find_package(gRPC REQUIRED) +find_package(Protobuf) +find_package(gRPC) set(CMAKE_CXX_STANDARD 14) # Allow for tools on PATH to be found