0001-cmake-Permit-setting-GRPC_CPP_PLUGIN.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 2e8a50cd4975df3ab60ee07c9675831cd5ad397f Mon Sep 17 00:00:00 2001
  2. From: Francis Laniel <flaniel@linux.microsoft.com>
  3. Date: Tue, 12 Apr 2022 19:54:11 +0100
  4. Subject: [PATCH] cmake: Permit setting GRPC_CPP_PLUGIN.
  5. This patch enables users to set GRPC_CPP_PLUGIN while calling cmake with:
  6. cmake -DGRPC_CPP_PLUGIN=/path
  7. Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
  8. ---
  9. cmake/modules/grpc.cmake | 6 ++++--
  10. 1 file changed, 4 insertions(+), 2 deletions(-)
  11. diff --git a/cmake/modules/grpc.cmake b/cmake/modules/grpc.cmake
  12. index e5fd16b8..9d8f5934 100644
  13. --- a/cmake/modules/grpc.cmake
  14. +++ b/cmake/modules/grpc.cmake
  15. @@ -12,9 +12,11 @@ elseif(NOT USE_BUNDLED_GRPC)
  16. set(GRPCPP_LIB gRPC::grpc++)
  17. # gRPC C++ plugin
  18. - get_target_property(GRPC_CPP_PLUGIN gRPC::grpc_cpp_plugin LOCATION)
  19. if(NOT GRPC_CPP_PLUGIN)
  20. - message(FATAL_ERROR "System grpc_cpp_plugin not found")
  21. + get_target_property(GRPC_CPP_PLUGIN gRPC::grpc_cpp_plugin LOCATION)
  22. + if(NOT GRPC_CPP_PLUGIN)
  23. + message(FATAL_ERROR "System grpc_cpp_plugin not found")
  24. + endif()
  25. endif()
  26. # gRPC include dir + properly handle grpc{++,pp}
  27. --
  28. 2.25.1