From a9df4e2a8184010253b0657f7046a484ae5cb46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Fri, 11 Dec 2020 17:41:02 -0800 Subject: [sentry-native] Fix sentry-config-cmake.in (#15042) --- ports/sentry-native/CONTROL | 1 + ports/sentry-native/fix-config-cmake.patch | 23 +++++++++++++++++++++++ ports/sentry-native/portfile.cmake | 4 +++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 ports/sentry-native/fix-config-cmake.patch diff --git a/ports/sentry-native/CONTROL b/ports/sentry-native/CONTROL index ed8004c6f..404da1cdd 100644 --- a/ports/sentry-native/CONTROL +++ b/ports/sentry-native/CONTROL @@ -1,5 +1,6 @@ Source: sentry-native Version: 0.4.4 +Port-Version: 1 Homepage: https://sentry.io/ Description: Sentry SDK for C, C++ and native applications. Build-Depends: curl (!windows) diff --git a/ports/sentry-native/fix-config-cmake.patch b/ports/sentry-native/fix-config-cmake.patch new file mode 100644 index 000000000..3e7a33120 --- /dev/null +++ b/ports/sentry-native/fix-config-cmake.patch @@ -0,0 +1,23 @@ +diff --git a/sentry-config.cmake.in b/sentry-config.cmake.in +index 89ea345..21d8732 100644 +--- a/sentry-config.cmake.in ++++ b/sentry-config.cmake.in +@@ -5,7 +5,7 @@ set(SENTRY_TRANSPORT @SENTRY_TRANSPORT@) + + 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 +14,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() diff --git a/ports/sentry-native/portfile.cmake b/ports/sentry-native/portfile.cmake index d4b6d313d..63eda4d3d 100644 --- a/ports/sentry-native/portfile.cmake +++ b/ports/sentry-native/portfile.cmake @@ -9,8 +9,10 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} - PATCHES fix-warningC5105.patch NO_REMOVE_ONE_LEVEL + PATCHES + fix-warningC5105.patch + fix-config-cmake.patch ) if (NOT DEFINED SENTRY_BACKEND) -- cgit v1.2.3