aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/sentry-native/CONTROL2
-rw-r--r--ports/sentry-native/portfile.cmake15
2 files changed, 15 insertions, 2 deletions
diff --git a/ports/sentry-native/CONTROL b/ports/sentry-native/CONTROL
index fbcf54f6c..a6166a379 100644
--- a/ports/sentry-native/CONTROL
+++ b/ports/sentry-native/CONTROL
@@ -1,6 +1,6 @@
Source: sentry-native
Version: 0.4.0
-Port-Version: 1
+Port-Version: 2
Homepage: https://sentry.io/
Description: Sentry SDK for C, C++ and native applications.
Build-Depends: curl (!windows)
diff --git a/ports/sentry-native/portfile.cmake b/ports/sentry-native/portfile.cmake
index 7370bd7d2..28fa4ea60 100644
--- a/ports/sentry-native/portfile.cmake
+++ b/ports/sentry-native/portfile.cmake
@@ -12,6 +12,18 @@ vcpkg_extract_source_archive_ex(
NO_REMOVE_ONE_LEVEL
)
+if (NOT DEFINED SENTRY_BACKEND)
+ if(MSVC AND CMAKE_GENERATOR_TOOLSET MATCHES "_xp$")
+ set(SENTRY_BACKEND "breakpad")
+ elseif(APPLE OR WIN32)
+ set(SENTRY_BACKEND "crashpad")
+ elseif(LINUX)
+ set(SENTRY_BACKEND "breakpad")
+ else()
+ set(SENTRY_BACKEND "inproc")
+ endif()
+endif()
+
if (VCPKG_TARGET_IS_WINDOWS)
set(SENTRY_NATIVE_C_STANDARD 99)
else()
@@ -26,6 +38,7 @@ vcpkg_configure_cmake(
-DSENTRY_BUILD_TESTS=OFF
-DSENTRY_BUILD_EXAMPLES=OFF
-DCMAKE_C_STANDARD=${SENTRY_NATIVE_C_STANDARD}
+ -DSENTRY_BACKEND=${SENTRY_BACKEND}
)
vcpkg_install_cmake()
@@ -36,7 +49,7 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sentry TARGET_PATH share/sentry)
-if (WIN32)
+if (WIN32 AND SENTRY_BACKEND STREQUAL "crashpad")
vcpkg_copy_tools(
TOOL_NAMES crashpad_handler
AUTO_CLEAN