mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 05:03:03 +08:00
[sentry-native] Add ability to control SENTRY_BACKEND variable (#13362)
This commit is contained in:
parent
1d66e5dd5b
commit
c5ff9ed1f0
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user