Repository navigation
feat: Add pkg-config support - #1411
Open
nmandelblit wants to merge 4 commits into
Open
nmandelblit wants to merge 4 commits into
nmandelblit wants to merge 4 commits into
Conversation
nmandelblit
force-pushed
the
add-pc-pkgconfig
branch
from
October 10, 2025 10:36
610a789 to
67ba9b8
Compare
nmandelblit
force-pushed
the
add-pc-pkgconfig
branch
3 times, most recently
from
October 10, 2025 13:44
c4b2054 to
7582025
Compare
- Added support for generating and installing a .pc file for pkg-config - Controlled by the SENTRY_INSTALL_PKGCONFIG CMake option - Uses CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR to support non-standard layouts (e.g., lib64) - Installs the generated file to the standard pkg-config directory
jpnurmi
force-pushed
the
add-pc-pkgconfig
branch
from
October 16, 2026 07:30
7582025 to
ae9f697
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1 #1411 +/- ##
==========================================
+ Coverage 75.47% 75.49% +0.01%
==========================================
Files 104 104
Lines 29637 29637
Branches 5481 5481
==========================================
+ Hits 22369 22374 +5
+ Misses 5844 5838 -6
- Partials 1424 1425 +1 🚀 New features to boost your workflow:
|
Export `bindir` in `sentry.pc` so consumers can locate the installed crash handler. Honor `CMAKE_INSTALL_BINDIR` when installing the native handler and its Windows companion so the metadata matches the layout. Add a standalone consumer that links through pkg-config and initializes the default backend using the installed handler and a writable database directory.
This branch has not been deployed
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.
Summary
.pcfile for pkg-configSENTRY_INSTALL_PKGCONFIGCMake optionCMAKE_INSTALL_LIBDIR,CMAKE_INSTALL_INCLUDEDIR, andCMAKE_INSTALL_BINDIRin the generated metadatabindirso consumers can locate the installed crash handler; the native handler installation also honorsCMAKE_INSTALL_BINDIR${CMAKE_INSTALL_LIBDIR}/pkgconfig)Benefits
This allows downstream projects to easily discover and link against sentry-native using pkg-config:
And for backends with out-of-process handlers, the path for
sentry_options_set_handler_path()can be resolved by querying bindir:Test plan
SENTRY_INSTALL_PKGCONFIGenabledsentry.pcfile is generated in build directorysentry.pcfile is installed to correct location