mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 11:11:39 +08:00
16be0b49c8
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
66 lines
1.7 KiB
CMake
66 lines
1.7 KiB
CMake
if(NOT VCPKG_TARGET_IS_OSX)
|
|
vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP")
|
|
endif()
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "https://github.com/getsentry/sentry-native/releases/download/0.4.13/sentry-native.zip"
|
|
FILENAME "sentry-native-0.4.13.zip"
|
|
SHA512 d3b1022886533057a08a6e36e9f36fb709882bc6ba1356a2c4004062ad7805d2e85fd06bda36a89a9d336a54c8668c79c7eaf89aa7954488729c052f3dc88f37
|
|
)
|
|
|
|
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()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
OPTIONS
|
|
-DSENTRY_BUILD_TESTS=OFF
|
|
-DSENTRY_BUILD_EXAMPLES=OFF
|
|
-DSENTRY_BACKEND=${SENTRY_BACKEND}
|
|
-DCRASHPAD_ZLIB_SYSTEM=ON
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
vcpkg_cmake_config_fixup(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
|
|
)
|