NetdataSentry.cmake 997 B

12345678910111213141516171819202122232425262728
  1. # SPDX-License-Identifier: GPL-3.0-or-later
  2. # Functions and macros for handling of Sentry
  3. #
  4. # Handle bundling of Sentry.
  5. #
  6. # This pulls it in as a sub-project using FetchContent functionality.
  7. #
  8. # This needs to be a function and not a macro for variable scoping
  9. # reasons. All the things we care about from the sub-project are exposed
  10. # as targets, which are globally scoped and not function scoped.
  11. function(netdata_bundle_sentry)
  12. include(FetchContent)
  13. # ignore debhelper
  14. set(FETCHCONTENT_FULLY_DISCONNECTED Off)
  15. set(SENTRY_VERSION 0.6.6)
  16. set(SENTRY_BACKEND "breakpad")
  17. set(SENTRY_BUILD_SHARED_LIBS OFF)
  18. FetchContent_Declare(
  19. sentry
  20. GIT_REPOSITORY https://github.com/getsentry/sentry-native.git
  21. GIT_TAG c97bcc63fa89ae557cef9c9b6e3acb11a72ff97d # v0.6.6
  22. CMAKE_ARGS ${NETDATA_CMAKE_PROPAGATE_TOOLCHAIN_ARGS}
  23. )
  24. FetchContent_MakeAvailable(sentry)
  25. endfunction()