vcpkg/ports/sentry-native/fix-config-cmake.patch
2024-01-23 11:48:10 -08:00

44 lines
1.4 KiB
Diff

diff --git a/sentry-config.cmake.in b/sentry-config.cmake.in
index 70ce7d3..796d428 100644
--- a/sentry-config.cmake.in
+++ b/sentry-config.cmake.in
@@ -1,5 +1,7 @@
@PACKAGE_INIT@
+include(CMakeFindDependencyMacro)
+
set(SENTRY_BACKEND @SENTRY_BACKEND@)
set(SENTRY_TRANSPORT @SENTRY_TRANSPORT@)
set(SENTRY_BUILD_SHARED_LIBS @SENTRY_BUILD_SHARED_LIBS@)
@@ -8,14 +10,14 @@ set(SENTRY_LINK_PTHREAD @SENTRY_LINK_PTHREAD@)
if(SENTRY_BACKEND STREQUAL "crashpad" AND NOT SENTRY_BUILD_SHARED_LIBS)
include("${CMAKE_CURRENT_LIST_DIR}/sentry_crashpad-targets.cmake")
if(NOT MSVC AND NOT SENTRY_BUILD_SHARED_LIBS)
- find_package(ZLIB REQUIRED)
+ find_dependency(ZLIB)
endif()
endif()
if(SENTRY_BACKEND STREQUAL "breakpad" AND NOT SENTRY_BUILD_SHARED_LIBS)
set(SENTRY_BREAKPAD_SYSTEM @SENTRY_BREAKPAD_SYSTEM@)
if(SENTRY_BREAKPAD_SYSTEM)
- find_package(PkgConfig REQUIRED)
+ find_dependency(PkgConfig)
pkg_check_modules(BREAKPAD REQUIRED IMPORTED_TARGET breakpad-client)
endif()
endif()
@@ -23,11 +25,9 @@ endif()
include("${CMAKE_CURRENT_LIST_DIR}/sentry-targets.cmake")
if(SENTRY_TRANSPORT STREQUAL "curl" AND (NOT @BUILD_SHARED_LIBS@ OR NOT SENTRY_BUILD_SHARED_LIBS))
- find_package(CURL REQUIRED)
- set_property(TARGET sentry::sentry APPEND
- PROPERTY INTERFACE_LINK_LIBRARIES ${CURL_LIBRARIES})
+ find_dependency(CURL)
endif()
if(SENTRY_LINK_PTHREAD AND NOT SENTRY_BUILD_SHARED_LIBS)
- find_package(Threads REQUIRED)
+ find_dependency(Threads)
endif()