mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 12:39:01 +08:00
43401f5835
* [opentelemetry-cpp] unvendor absl polyfills By default opentelemetry vendors-in a copy of some Abseil polyfills (e.g. `absl::variant`). That makes it hard (I would claim nearly impossible) to use both the abseil and the opentelemetry-cpp ports at the same time, as both define `absl::variant` in some of their headers. It seems better to always use the `-DHAVE_ABSEIL=ON` CMake option and depend on the abseil port. Outside vcpkg it may be useful to use such vendored-in copies of the code, as that "simplifies" dependency management. In the context of vcpkg that is just wasteful. Simplified how to support `abseil[cxx17]` by removing some code in opentelemetry that forcibly downgraded the compiler to use C++11. Add a missing dependency for gRPC generated code. This code indirectly depends on Abseil too. * Opentelemetry is missing a find_dependency() when -DHAVE_ABSEIL=ON
16 lines
539 B
Diff
16 lines
539 B
Diff
diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake
|
|
index 1aa1ba0..10e2f58 100644
|
|
--- a/cmake/opentelemetry-proto.cmake
|
|
+++ b/cmake/opentelemetry-proto.cmake
|
|
@@ -285,6 +285,10 @@ else() # cmake 3.8 or lower
|
|
target_link_libraries(opentelemetry_proto INTERFACE ${Protobuf_LIBRARIES})
|
|
endif()
|
|
|
|
+if(TARGET gRPC::grpc++)
|
|
+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++)
|
|
+endif()
|
|
+
|
|
if(BUILD_SHARED_LIBS)
|
|
set_property(TARGET opentelemetry_proto PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
endif()
|