Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: provide correct dependencies for CMake client projects... #926

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

supervacuus
Copy link
Collaborator

@supervacuus supervacuus commented Dec 19, 2023

...which use a system-provided breakpad (instead of our vendored fork).

The problem here was that people who introduce sentry-native via CMake find_package() will get insufficient dependencies, which leads to configuration errors in the client CMake project.

There are two aspects to this problem:

  • if the user builds sentry as a shared library, it shouldn't be necessary to specify the dependencies. This can be fixed by defining breakpad as a PRIVATE dependency. This should also fix the Gentoo issue because it uses sentry as a shared library afaict.
  • if the user builds sentry as a static library, then we must stay with the PUBLIC dependency, but we also need to correctly search for breakpad, libcurl, and pthread in the context of the client project.

Fixes #877.

...that use a system provided breakpad (instead of our vendored fork).

The problem [here](#877)
was that people who introduce sentry-native via CMake `find_package()`
will get insufficient dependencies which leads to configuration errors
in the client CMake project.

There are two aspects to this problem:
* if the user builds sentry as a shared library it shouldn't be
necessary to specify the dependencies. This can be fixed by defining
`breakpad` as a `PRIVATE` dependency in that case. This should also be
the fix for the Gentoo issue because it uses sentry as a shared library
 afaict.
* if the user builds sentry as a static library, then we must stay with
the `PUBLIC` dependency, but we also need to correctly search for
breakpad, libcurl and pthread in the context of the client project.
sentry-config.cmake.in Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (613f470) 82.61% compared to head (f6714a8) 82.61%.

❗ Current head f6714a8 differs from pull request most recent head 49046a1. Consider uploading reports for the commit 49046a1 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #926   +/-   ##
=======================================
  Coverage   82.61%   82.61%           
=======================================
  Files          53       53           
  Lines        7376     7376           
  Branches     1186     1186           
=======================================
  Hits         6094     6094           
  Misses       1173     1173           
  Partials      109      109           

@supervacuus supervacuus merged commit 00061be into master Dec 19, 2023
21 checks passed
@supervacuus supervacuus deleted the fix/breakpad_system_install_cmake branch December 19, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake modules are broken for SENTRY_BREAKPAD_SYSTEM
2 participants