summaryrefslogtreecommitdiffstats
path: root/packaging/cmake/Modules/NetdataSentry.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-24 09:54:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-24 09:54:44 +0000
commit836b47cb7e99a977c5a23b059ca1d0b5065d310e (patch)
tree1604da8f482d02effa033c94a84be42bc0c848c3 /packaging/cmake/Modules/NetdataSentry.cmake
parentReleasing debian version 1.44.3-2. (diff)
downloadnetdata-836b47cb7e99a977c5a23b059ca1d0b5065d310e.tar.xz
netdata-836b47cb7e99a977c5a23b059ca1d0b5065d310e.zip
Merging upstream version 1.46.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/cmake/Modules/NetdataSentry.cmake')
-rw-r--r--packaging/cmake/Modules/NetdataSentry.cmake30
1 files changed, 30 insertions, 0 deletions
diff --git a/packaging/cmake/Modules/NetdataSentry.cmake b/packaging/cmake/Modules/NetdataSentry.cmake
new file mode 100644
index 000000000..b20aeedd5
--- /dev/null
+++ b/packaging/cmake/Modules/NetdataSentry.cmake
@@ -0,0 +1,30 @@
+# Functions and macros for handling of Sentry
+#
+# Copyright (c) 2024 Netdata Inc.
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# Handle bundling of Sentry.
+#
+# This pulls it in as a sub-project using FetchContent functionality.
+#
+# This needs to be a function and not a macro for variable scoping
+# reasons. All the things we care about from the sub-project are exposed
+# as targets, which are globally scoped and not function scoped.
+function(netdata_bundle_sentry)
+ include(FetchContent)
+
+ # ignore debhelper
+ set(FETCHCONTENT_FULLY_DISCONNECTED Off)
+
+ set(SENTRY_VERSION 0.6.6)
+ set(SENTRY_BACKEND "breakpad")
+ set(SENTRY_BUILD_SHARED_LIBS OFF)
+
+ FetchContent_Declare(
+ sentry
+ GIT_REPOSITORY https://github.com/getsentry/sentry-native.git
+ GIT_TAG c97bcc63fa89ae557cef9c9b6e3acb11a72ff97d # v0.6.6
+ CMAKE_ARGS ${NETDATA_CMAKE_PROPAGATE_TOOLCHAIN_ARGS}
+ )
+ FetchContent_MakeAvailable(sentry)
+endfunction()