early-access version 2853
This commit is contained in:
27
externals/vcpkg/ports/sentry-native/fix-config-cmake.patch
vendored
Executable file
27
externals/vcpkg/ports/sentry-native/fix-config-cmake.patch
vendored
Executable file
@@ -0,0 +1,27 @@
|
||||
diff --git a/sentry-config.cmake.in b/sentry-config.cmake.in
|
||||
index 89ea345..c14b31c 100644
|
||||
--- a/sentry-config.cmake.in
|
||||
+++ b/sentry-config.cmake.in
|
||||
@@ -3,9 +3,11 @@
|
||||
set(SENTRY_BACKEND @SENTRY_BACKEND@)
|
||||
set(SENTRY_TRANSPORT @SENTRY_TRANSPORT@)
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+
|
||||
if(SENTRY_BACKEND STREQUAL "crashpad")
|
||||
if(@SENTRY_CRASHPAD_SYSTEM@)
|
||||
- find_package(crashpad REQUIRED)
|
||||
+ find_dependency(crashpad)
|
||||
else()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/sentry_crashpad-targets.cmake")
|
||||
endif()
|
||||
@@ -14,7 +16,7 @@ endif()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/sentry-targets.cmake")
|
||||
|
||||
if(SENTRY_TRANSPORT STREQUAL "curl" AND NOT @BUILD_SHARED_LIBS@)
|
||||
- find_package(CURL REQUIRED)
|
||||
+ find_dependency(CURL)
|
||||
set_property(TARGET sentry::sentry APPEND
|
||||
- PROPERTY INTERFACE_LINK_LIBRARIES ${CURL_LIBRARIES})
|
||||
+ PROPERTY INTERFACE_LINK_LIBRARIES CURL::libcurl)
|
||||
endif()
|
||||
12
externals/vcpkg/ports/sentry-native/fix-warningC5105.patch
vendored
Executable file
12
externals/vcpkg/ports/sentry-native/fix-warningC5105.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/external/crashpad/third_party/zlib/zlib/x86.c b/external/crashpad/third_party/zlib/zlib/x86.c
|
||||
index e56fe8b..902e373 100644
|
||||
--- a/external/crashpad/third_party/zlib/zlib/x86.c
|
||||
+++ b/external/crashpad/third_party/zlib/zlib/x86.c
|
||||
@@ -8,6 +8,7 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
+#pragma warning(disable : 5105)
|
||||
#include "x86.h"
|
||||
#include "zutil.h"
|
||||
|
||||
68
externals/vcpkg/ports/sentry-native/portfile.cmake
vendored
Executable file
68
externals/vcpkg/ports/sentry-native/portfile.cmake
vendored
Executable file
@@ -0,0 +1,68 @@
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/getsentry/sentry-native/releases/download/0.4.17/sentry-native.zip"
|
||||
FILENAME "sentry-native-0.4.17.zip"
|
||||
SHA512 03ee36f5420b0f3a21b1e4b58fe88b67a883abda27c0c644e3a9916674e1847a91ee2a3815908747738a77e8984b46f92fc776405ee443c71c69e352eeecebe6
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
NO_REMOVE_ONE_LEVEL
|
||||
PATCHES
|
||||
fix-warningC5105.patch
|
||||
fix-config-cmake.patch
|
||||
use-zlib-target.patch
|
||||
)
|
||||
|
||||
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 AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
set(VCPKG_CXX_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_CXX_FLAGS}")
|
||||
set(VCPKG_C_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DSENTRY_BUILD_TESTS=OFF
|
||||
-DSENTRY_BUILD_EXAMPLES=OFF
|
||||
-DSENTRY_BACKEND=${SENTRY_BACKEND}
|
||||
-DCRASHPAD_ZLIB_SYSTEM=ON
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
CRASHPAD_ZLIB_SYSTEM
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME sentry CONFIG_PATH lib/cmake/sentry)
|
||||
|
||||
if (SENTRY_BACKEND STREQUAL "crashpad")
|
||||
vcpkg_copy_tools(
|
||||
TOOL_NAMES crashpad_handler
|
||||
AUTO_CLEAN
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
file(
|
||||
INSTALL "${SOURCE_PATH}/LICENSE"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
||||
RENAME copyright
|
||||
)
|
||||
12
externals/vcpkg/ports/sentry-native/use-zlib-target.patch
vendored
Executable file
12
externals/vcpkg/ports/sentry-native/use-zlib-target.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/external/crashpad/CMakeLists.txt b/external/crashpad/CMakeLists.txt
|
||||
index abb0697..a57ff04 100644
|
||||
--- a/external/crashpad/CMakeLists.txt
|
||||
+++ b/external/crashpad/CMakeLists.txt
|
||||
@@ -22,6 +22,7 @@ option(CRASHPAD_ZLIB_SYSTEM "Use system zlib library" "${CRASHPAD_ZLIB_SYSTEM_DE
|
||||
|
||||
if(CRASHPAD_ZLIB_SYSTEM)
|
||||
find_package(ZLIB REQUIRED)
|
||||
+ set(ZLIB_LIBRARIES ZLIB::ZLIB)
|
||||
endif()
|
||||
|
||||
if(LINUX OR ANDROID)
|
||||
23
externals/vcpkg/ports/sentry-native/vcpkg.json
vendored
Executable file
23
externals/vcpkg/ports/sentry-native/vcpkg.json
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "sentry-native",
|
||||
"version": "0.4.17",
|
||||
"description": "Sentry SDK for C, C++ and native applications.",
|
||||
"homepage": "https://sentry.io/",
|
||||
"license": "MIT",
|
||||
"supports": "osx | (!arm & !uwp)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"platform": "!windows"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user