getsentry / sentry-native

Sentry SDK for C, C++ and native applications.
MIT License
378 stars 164 forks source link

Fix 'crashpad' Remove NOT condition for SENTRY_BUILD_SHARED_LIBS as it blocks adding crashpad handler target.cmake #1007

Closed podlaszczyk closed 3 weeks ago

podlaszczyk commented 3 weeks ago

When sentry lib is built as shared library (SENTRY_BUILD_SHARED_LIBS = ON) - that is default value then sentry_crashpad-targets.cmake is not included. Thus $ won't work.

Open question:

  1. Why sentry_crashpad-targets.cmake used to be included only for static library?
  2. Could it be included for both static and dynamic?
  3. improvement: find_dependency for ZLIB instead of find_package - as we are calling from *.cmake file https://cmake.org/cmake/help/latest/module/CMakeFindDependencyMacro.html