[CMAKE] Add pkg-config support for OpenTelemetry proto installation#4192
Open
owent wants to merge 2 commits into
Open
[CMAKE] Add pkg-config support for OpenTelemetry proto installation#4192owent wants to merge 2 commits into
owent wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds pkg-config metadata for the installed OpenTelemetry protobuf/gRPC protobuf libraries so non-CMake consumers can obtain the required -DOPENTELEMETRY_PROTO_API=... compile definition via pkg-config --cflags, addressing the undefined macro issue reported in #4182.
Changes:
- Add an include guard to the shared
cmake/pkgconfig.cmakehelper to prevent repeated inclusion. - Generate and install
opentelemetry_proto.pc(andopentelemetry_proto_grpc.pcwhenWITH_OTLP_GRPC=ON) duringOPENTELEMETRY_INSTALL.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
cmake/pkgconfig.cmake |
Adds include_guard(GLOBAL) to avoid re-including the pkg-config helper module. |
cmake/opentelemetry-proto.cmake |
Installs generated proto headers and installs new pkg-config .pc files for opentelemetry_proto (+ opentelemetry_proto_grpc when enabled). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4192 +/- ##
==========================================
+ Coverage 82.89% 82.90% +0.02%
==========================================
Files 405 405
Lines 17292 17292
==========================================
+ Hits 14332 14334 +2
+ Misses 2960 2958 -2 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4182
Changes
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes