feature merge mac sentry to win platform.

This commit is contained in:
alves
2025-12-05 13:06:46 +08:00
parent 70fa560264
commit 51ec64470e
9 changed files with 163 additions and 46 deletions

View File

@@ -543,7 +543,12 @@ find_package(TBB REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(CURL REQUIRED)
if (SLIC3R_SENTRY)
find_package(Sentry REQUIRED)
find_package(Sentry QUIET)
if (NOT Sentry_FOUND)
message(WARNING "Sentry SDK not found. SLIC3R_SENTRY will be disabled. "
"Build deps with Sentry support or use -DSLIC3R_SENTRY=OFF")
set(SLIC3R_SENTRY OFF CACHE BOOL "Enable Sentry crash reporting SDK" FORCE)
endif()
endif()
find_package(Freetype REQUIRED)
@@ -569,7 +574,17 @@ if (SLIC3R_SENTRY)
else()
message(WARNING "sentry.lib not found in ${CMAKE_PREFIX_PATH}/lib. Sentry SDK may not have been built yet.")
endif()
endif()
elseif (APPLE AND CMAKE_PREFIX_PATH)
# Try to find libsentry.dylib in the install prefix for macOS
file(GLOB _sentry_lib "${CMAKE_PREFIX_PATH}/lib/libsentry.dylib")
if (_sentry_lib)
target_link_directories(sentry INTERFACE "${CMAKE_PREFIX_PATH}/lib")
target_link_libraries(sentry INTERFACE "sentry")
message(STATUS "Found libsentry.dylib at: ${CMAKE_PREFIX_PATH}/lib")
else()
message(WARNING "libsentry.dylib not found in ${CMAKE_PREFIX_PATH}/lib. Sentry SDK may not have been built yet.")
endif()
endif()
endif()
# Fixing curl's cmake config script bugs