From 24ff395bb4c376ef700fd154e23a36ff43388a13 Mon Sep 17 00:00:00 2001 From: Feng Li Date: Mon, 13 Nov 2017 14:16:04 -0800 Subject: [PATCH] Change gRPC-Web make file to add the protobuf include directory. --- Makefile | 5 +++-- net/grpc/gateway/runtime/runtime.cc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ec1250d..2c2cc5d 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ OS := $(shell uname) CC := g++ ROOT_DIR := $(shell pwd) GRPC_GATEWAY_PROTOS := $(ROOT_DIR)/net/grpc/gateway/protos +PROTO_INC := $(ROOT_DIR)/third_party/grpc/third_party/protobuf/include PROTO_SRC := $(ROOT_DIR)/third_party/grpc/third_party/protobuf/src PROTO_LIB := $(PROTO_SRC)/.libs PROTOC := $(PROTO_SRC)/protoc @@ -41,7 +42,7 @@ nginx_config: auto/configure \ --with-http_ssl_module \ --with-http_v2_module \ - --with-cc-opt="-I /usr/local/include -I $(ROOT_DIR) -I $(PROTO_SRC) \ + --with-cc-opt="-I /usr/local/include -I $(ROOT_DIR) -I $(PROTO_INC) -I $(PROTO_SRC) \ -I $(GRPC_INC) -I $(GRPC_SRC)" \ --with-ld-opt="$(NGINX_LD_OPT)" \ --with-openssl="$(ROOT_DIR)/third_party/openssl" \ @@ -52,7 +53,7 @@ nginx_config_static: auto/configure \ --with-http_ssl_module \ --with-http_v2_module \ - --with-cc-opt="-I /usr/local/include -I $(ROOT_DIR) -I $(PROTO_SRC) \ + --with-cc-opt="-I /usr/local/include -I $(ROOT_DIR) -I $(PROTO_INC) -I $(PROTO_SRC) \ -I $(GRPC_INC) -I $(GRPC_SRC)" \ --with-ld-opt="$(NGINX_STATIC_LD_OPT)" \ --with-openssl="$(ROOT_DIR)/third_party/openssl" \ diff --git a/net/grpc/gateway/runtime/runtime.cc b/net/grpc/gateway/runtime/runtime.cc index f4921b8..e843b1d 100644 --- a/net/grpc/gateway/runtime/runtime.cc +++ b/net/grpc/gateway/runtime/runtime.cc @@ -4,6 +4,7 @@ #include #include +#include "google/protobuf/stubs/common.h" #include "net/grpc/gateway/backend/grpc_backend.h" #include "net/grpc/gateway/codec/b64_proto_decoder.h" #include "net/grpc/gateway/codec/b64_proto_encoder.h" @@ -23,7 +24,6 @@ #include "net/grpc/gateway/runtime/constants.h" #include "third_party/grpc/include/grpc++/support/config.h" #include "third_party/grpc/include/grpc/grpc.h" -#include "third_party/protobuf/include/google/protobuf/stubs/common.h" namespace grpc { namespace gateway {