aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitalii Koshura <lestat.de.lionkur@gmail.com>2020-09-05 06:12:47 +0200
committerGitHub <noreply@github.com>2020-09-04 21:12:47 -0700
commitc5ff9ed1f09f193e1965606e8dd39bf7e5086998 (patch)
treeb7702d75dd2fc83808ddaed77442e279718a2743
parent1d66e5dd5b83343e36c5760f38beac117bef55d3 (diff)
downloadvcpkg-c5ff9ed1f09f193e1965606e8dd39bf7e5086998.tar.gz
vcpkg-c5ff9ed1f09f193e1965606e8dd39bf7e5086998.zip
[sentry-native] Add ability to control SENTRY_BACKEND variable (#13362)
-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