From 6d6339db34654cf8f9035f8cdb2935a7649e6d0d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 14 Aug 2020 17:43:32 +0200 Subject: [PATCH] fix non-bazel build systems --- build_handwritten.yaml | 2 +- cmake/upb.cmake | 2 +- setup.py | 5 ++++- templates/config.m4.template | 1 + templates/gRPC-C++.podspec.template | 3 ++- templates/gRPC-Core.podspec.template | 5 +++-- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/build_handwritten.yaml b/build_handwritten.yaml index 26e1af33600..5ee7044a838 100644 --- a/build_handwritten.yaml +++ b/build_handwritten.yaml @@ -215,7 +215,7 @@ defaults: CFLAGS: -g COREFLAGS: -fno-exceptions CPPFLAGS: -g -Wall -Wextra -DOSATOMIC_USE_INLINED=1 -Ithird_party/abseil-cpp -Ithird_party/re2 - -Ithird_party/upb -Isrc/core/ext/upb-generated + -Ithird_party/upb -Isrc/core/ext/upb-generated -Isrc/core/ext/upbdefs-generated LDFLAGS: -g zlib: CFLAGS: -fvisibility=hidden diff --git a/cmake/upb.cmake b/cmake/upb.cmake index 2c0ab84e677..f2a0e508c34 100644 --- a/cmake/upb.cmake +++ b/cmake/upb.cmake @@ -15,6 +15,6 @@ set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb) set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}") -set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated") +set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated") set(_gRPC_UPB_LIBRARIES upb) diff --git a/setup.py b/setup.py index 3234353efad..20a6d76dbe0 100644 --- a/setup.py +++ b/setup.py @@ -71,6 +71,8 @@ SSL_INCLUDE = (os.path.join('third_party', 'boringssl-with-bazel', 'src', UPB_INCLUDE = (os.path.join('third_party', 'upb'),) UPB_GRPC_GENERATED_INCLUDE = (os.path.join('src', 'core', 'ext', 'upb-generated'),) +UPBDEFS_GRPC_GENERATED_INCLUDE = (os.path.join('src', 'core', 'ext', + 'upbdefs-generated'),) ZLIB_INCLUDE = (os.path.join('third_party', 'zlib'),) README = os.path.join(PYTHON_STEM, 'README.rst') @@ -247,7 +249,8 @@ if BUILD_WITH_SYSTEM_CARES: EXTENSION_INCLUDE_DIRECTORIES = ((PYTHON_STEM,) + CORE_INCLUDE + ABSL_INCLUDE + ADDRESS_SORTING_INCLUDE + CARES_INCLUDE + RE2_INCLUDE + SSL_INCLUDE + UPB_INCLUDE + - UPB_GRPC_GENERATED_INCLUDE + ZLIB_INCLUDE) + UPB_GRPC_GENERATED_INCLUDE + + UPBDEFS_GRPC_GENERATED_INCLUDE + ZLIB_INCLUDE) EXTENSION_LIBRARIES = () if "linux" in sys.platform: diff --git a/templates/config.m4.template b/templates/config.m4.template index 040a60389cc..1e074a7ba2b 100644 --- a/templates/config.m4.template +++ b/templates/config.m4.template @@ -9,6 +9,7 @@ dnl # --with-grpc -> add include path PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/include) PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/src/core/ext/upb-generated) + PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/src/core/ext/upbdefs-generated) PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/src/php/ext/grpc) PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/abseil-cpp) PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/address_sorting/include) diff --git a/templates/gRPC-C++.podspec.template b/templates/gRPC-C++.podspec.template index 8d5df03f870..b94e557a830 100644 --- a/templates/gRPC-C++.podspec.template +++ b/templates/gRPC-C++.podspec.template @@ -204,7 +204,8 @@ sed -E -i '' 's;#include ;#if COCOAPODS==1\\\n #include \\\n#else\\\n #include \\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include ;#if COCOAPODS==1\\\n #include \\\n#else\\\n #include \\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include