Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUILD] Fix build without vcpkg on Windows if gRPC is disabled
Currently, if support for gRPC is disabled by configuring the build with `-DWITH_OTLP_GRPC=OFF`, you are on Windows and do not use a toolchain file then the build will always use all third-party dependencies from vcpkg, regardless of whether nlohmann-json, abseil and protobuf were found or not. The root cause for this behavior is a bug in the condition meant to check that all dependencies have been found, which unconditionally checks for `NOT gRPC_FOUND`, but the corresponding `find_package` call is only performed if `WITH_OTLP_GRPC` is true, and thus causing that condition to always evaluate to `true` if `WITH_OTLP_GRPC` is false.
- Loading branch information