2020-09-01 08:57:35 +08:00
|
|
|
vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP")
|
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2020-10-14 04:19:53 +08:00
|
|
|
URLS "https://github.com/getsentry/sentry-native/releases/download/0.4.3/sentry-native.zip"
|
|
|
|
FILENAME "sentry-native-0.4.3.zip"
|
|
|
|
SHA512 73f927aa27b3ff567cdbcf9f59af3f5b0e824a6e0ac4bcd70652dbe6f1c5b81d70afea90fc9f889f9f6b27e742edc975d32ccb4daa8435a3570d6a1d16fe32c3
|
2020-09-01 08:57:35 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
NO_REMOVE_ONE_LEVEL
|
|
|
|
)
|
|
|
|
|
2020-09-05 12:12:47 +08: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 08:57:35 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DSENTRY_BUILD_TESTS=OFF
|
|
|
|
-DSENTRY_BUILD_EXAMPLES=OFF
|
2020-09-05 12:12:47 +08:00
|
|
|
-DSENTRY_BACKEND=${SENTRY_BACKEND}
|
2020-09-01 08:57:35 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2020-09-05 11:07:29 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sentry TARGET_PATH share/sentry)
|
2020-09-01 08:57:35 +08:00
|
|
|
|
2020-09-05 12:12:47 +08:00
|
|
|
if (WIN32 AND SENTRY_BACKEND STREQUAL "crashpad")
|
2020-09-01 08:57:35 +08: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
|
|
|
|
)
|