mirror of https://github.com/grpc/grpc.git
cmake: fix cross-compilation with gRPC_BUILD_GRPC_CPP_PLUGIN=OFF (#26292)
* cmake: fix cross-compilation with gRPC_BUILD_GRPC_CPP_PLUGIN=OFF When cross-compiling gRPC, a _native_ version of 'grpc_cpp_plugin' is searched in the environment. For most use cases, a _cross_ version of this file is not needed and gRPC_BUILD_GRPC_CPP_PLUGIN can be set to OFF. However, when cross-building with -DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF, there are some build errors, for example: make[3]: *** No rule to make target 'grpc_cpp_plugin', needed by 'gens/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc'. Stop. This is because there is still a hard dependency on 'grpc_cpp_plugin' for these targets, not taking into account the cross-compilation case. Fix by depending on the variable gRPC_CPP_PLUGIN, which is set correctly for either cross or native case. * regenerate projectspull/26420/head
parent
932dbed49d
commit
da10b795e1
2 changed files with 2 additions and 2 deletions
Loading…
Reference in new issue