2021-06-03 21:53:54 +02:00
|
|
|
if(NOT VCPKG_TARGET_IS_OSX)
|
|
|
|
vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP")
|
|
|
|
endif()
|
2020-09-01 02:57:35 +02:00
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2021-08-05 12:03:11 +02:00
|
|
|
URLS "https://github.com/getsentry/sentry-native/releases/download/0.4.12/sentry-native.zip"
|
|
|
|
FILENAME "sentry-native-0.4.12.zip"
|
|
|
|
SHA512 15da4407ed5e2c8d5e56e497ccc6006b29235aef6b3a81e034c93443e20a7cfdf95d55e31b88e552c55e824eb15d6f7fafe988c453a5a6f36fe45136d7268b19
|
2020-09-01 02:57:35 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
NO_REMOVE_ONE_LEVEL
|
2020-12-11 17:41:02 -08:00
|
|
|
PATCHES
|
|
|
|
fix-warningC5105.patch
|
|
|
|
fix-config-cmake.patch
|
2021-07-27 01:54:30 +02:00
|
|
|
use-zlib-target.patch
|
2020-09-01 02:57:35 +02:00
|
|
|
)
|
|
|
|
|
2020-09-05 06:12:47 +02:00
|
|
|
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()
|
|
|
|
|
2020-09-01 02:57:35 +02:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DSENTRY_BUILD_TESTS=OFF
|
|
|
|
-DSENTRY_BUILD_EXAMPLES=OFF
|
2020-09-05 06:12:47 +02:00
|
|
|
-DSENTRY_BACKEND=${SENTRY_BACKEND}
|
2021-07-27 01:54:30 +02:00
|
|
|
-DCRASHPAD_ZLIB_SYSTEM=ON
|
2020-09-01 02:57:35 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2020-09-04 20:07:29 -07:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sentry TARGET_PATH share/sentry)
|
2020-09-01 02:57:35 +02:00
|
|
|
|
2021-06-03 21:53:54 +02:00
|
|
|
if (SENTRY_BACKEND STREQUAL "crashpad")
|
2020-09-01 02:57:35 +02:00
|
|
|
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
|
|
|
|
)
|