File tree Expand file tree Collapse file tree 4 files changed +20
-12
lines changed
Expand file tree Collapse file tree 4 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -359,6 +359,7 @@ if(WITH_OTLP_GRPC
359359 endif ()
360360
361361 include ("${opentelemetry-cpp_SOURCE_DIR}/cmake/protobuf.cmake" )
362+
362363 include ("${opentelemetry-cpp_SOURCE_DIR}/cmake/opentelemetry-proto.cmake" )
363364endif ()
364365
@@ -584,10 +585,13 @@ if(opentelemetry-proto_VERSION)
584585 )
585586endif ()
586587if (Protobuf_VERSION)
587- message (STATUS "Protobuf: ${Protobuf_VERSION} (${Protobuf_PROVIDER} )" )
588+ message (
589+ STATUS
590+ "Protobuf: ${Protobuf_VERSION} (${Protobuf_PROVIDER} - ${protobuf_lib_type} )"
591+ )
588592endif ()
589593if (gRPC_VERSION)
590- message (STATUS "gRPC: ${gRPC_VERSION} (${gRPC_PROVIDER} )" )
594+ message (STATUS "gRPC: ${gRPC_VERSION} (${gRPC_PROVIDER} - ${grpc_lib_type} )" )
591595endif ()
592596if (CURL_VERSION)
593597 message (STATUS "CURL: ${CURL_VERSION} (${CURL_PROVIDER} )" )
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ if(NOT gRPC_FOUND)
4141 set (gRPC_RE2_PROVIDER "module" CACHE STRING "" FORCE)
4242 set (RE2_BUILD_TESTING OFF CACHE BOOL "" FORCE)
4343 set (gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "" FORCE)
44+ set (gRPC_PROTOBUF_PACKAGE_TYPE "CONFIG" CACHE STRING "" FORCE)
4445 set (gRPC_ABSL_PROVIDER "module" CACHE STRING "" FORCE)
4546 set (gRPC_CARES_PROVIDER "module" CACHE STRING "" FORCE)
4647
@@ -56,14 +57,15 @@ if(NOT gRPC_FOUND)
5657 CXX_CLANG_TIDY "" )
5758 endif ()
5859 endforeach ()
59- endif ()
6060
61- if (TARGET grpc++ AND NOT TARGET gRPC::grpc++)
62- add_library (gRPC::grpc++ ALIAS grpc++)
63- endif ()
61+ if (TARGET grpc++ AND NOT TARGET gRPC::grpc++)
62+ add_library (gRPC::grpc++ ALIAS grpc++)
63+ endif ()
64+
65+ if (TARGET grpc_cpp_plugin AND NOT TARGET gRPC::grpc_cpp_plugin)
66+ add_executable (gRPC::grpc_cpp_plugin ALIAS grpc_cpp_plugin)
67+ endif ()
6468
65- if (TARGET grpc_cpp_plugin AND NOT TARGET gRPC::grpc_cpp_plugin)
66- add_executable (gRPC::grpc_cpp_plugin ALIAS grpc_cpp_plugin)
6769endif ()
6870
6971if (NOT TARGET gRPC::grpc++)
Original file line number Diff line number Diff line change @@ -49,11 +49,12 @@ else()
4949
5050 # Set the Protobuf_VERSION variable from the git tag.
5151 string (REGEX REPLACE "^v([0-9]+\\ .[0-9]+\\ .[0-9]+)$" "\\ 1" Protobuf_VERSION "${protobuf_GIT_TAG} " )
52- endif ()
53- endif ()
5452
55- if (TARGET libprotobuf)
56- set_target_properties (libprotobuf PROPERTIES POSITION_INDEPENDENT_CODE ON CXX_CLANG_TIDY "" CXX_INCLUDE_WHAT_YOU_USE "" )
53+ if (TARGET libprotobuf)
54+ set_target_properties (libprotobuf PROPERTIES POSITION_INDEPENDENT_CODE ON CXX_CLANG_TIDY "" CXX_INCLUDE_WHAT_YOU_USE "" )
55+ endif ()
56+
57+ endif ()
5758endif ()
5859
5960if (NOT TARGET protobuf::libprotobuf)
Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ if(grpc IN_LIST _THIRDPARTY_PACKAGE_LIST)
232232 "-DRE2_BUILD_TESTING=OFF"
233233 "-DgRPC_ZLIB_PROVIDER=package"
234234 "-DgRPC_PROTOBUF_PROVIDER=package"
235+ "-DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG"
235236 "-DgRPC_ABSL_PROVIDER=package" )
236237
237238 add_dependencies (grpc-build zlib-install abseil-install protobuf-install )
You can’t perform that action at this time.
0 commit comments