From 91954d61ce19741186c29cd50aa5b0aaf9c00746 Mon Sep 17 00:00:00 2001 From: Mark Stemm Date: Tue, 2 Apr 2019 10:34:54 -0700 Subject: [PATCH] Define GRPC_CPP_PLUGIN (#569) Bringing over the top CMakeLists.txt change in https://github.com/draios/sysdig/pull/1349 to define GRPC_CPP_PLUGIN so it can be referred to when autogenerating grpc code. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 05bc5ac3..2723e1e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -568,12 +568,17 @@ if(NOT USE_BUNDLED_GRPC) else() message(FATAL_ERROR "Couldn't find system grpc") endif() + find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin) + if(NOT GRPC_CPP_PLUGIN) + message(FATAL_ERROR "System grpc_cpp_plugin not found") + endif() else() set(GRPC_SRC "${PROJECT_BINARY_DIR}/grpc-prefix/src/grpc") message(STATUS "Using bundled grpc in '${GRPC_SRC}'") set(GRPC_INCLUDE "${GRPC_SRC}/include") set(GRPC_LIB "${GRPC_SRC}/libs/opt/libgrpc_unsecure.a") set(GRPCPP_LIB "${GRPC_SRC}/libs/opt/libgrpc++_unsecure.a") + set(GRPC_CPP_PLUGIN "${GRPC_SRC}/bins/opt/grpc_cpp_plugin") get_filename_component(PROTOC_DIR ${PROTOC} DIRECTORY)