NetdataSentry.cmake 1.0 KB

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