mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-14 20:47:33 +00:00
feature add sentry for soft catch dmp
This commit is contained in:
@@ -534,6 +534,7 @@ find_package(TBB REQUIRED)
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(CURL REQUIRED)
|
||||
find_package(Sentry REQUIRED)
|
||||
find_package(Freetype REQUIRED)
|
||||
|
||||
|
||||
@@ -543,6 +544,22 @@ target_link_libraries(libcurl INTERFACE CURL::libcurl)
|
||||
find_package(ZLIB REQUIRED)
|
||||
target_link_libraries(libcurl INTERFACE ZLIB::ZLIB)
|
||||
|
||||
add_library(sentry INTERFACE)
|
||||
target_link_libraries(sentry INTERFACE sentry::sentry)
|
||||
|
||||
# Add sentry library directory and link sentry.lib explicitly for Windows
|
||||
if (WIN32 AND CMAKE_PREFIX_PATH)
|
||||
# Try to find sentry.lib in the install prefix
|
||||
file(GLOB _sentry_lib "${CMAKE_PREFIX_PATH}/lib/sentry.lib")
|
||||
if (_sentry_lib)
|
||||
target_link_directories(sentry INTERFACE "${CMAKE_PREFIX_PATH}/lib")
|
||||
target_link_libraries(sentry INTERFACE "sentry.lib")
|
||||
message(STATUS "Found sentry.lib at: ${CMAKE_PREFIX_PATH}/lib")
|
||||
else()
|
||||
message(WARNING "sentry.lib not found in ${CMAKE_PREFIX_PATH}/lib. Sentry SDK may not have been built yet.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Fixing curl's cmake config script bugs
|
||||
if (NOT WIN32)
|
||||
# Required by libcurl
|
||||
@@ -727,6 +744,14 @@ function(Snapmaker_Orca_copy_dlls target config postfix output_dlls)
|
||||
${TOP_LEVEL_PROJECT_DIR}/deps/WebView2/lib/win-${_arch}/WebView2Loader.dll
|
||||
DESTINATION ${_out_dir})
|
||||
|
||||
# Copy Sentry and Crashpad artifacts if they were built by deps
|
||||
if (EXISTS "${CMAKE_PREFIX_PATH}/bin/sentry.dll")
|
||||
file(COPY "${CMAKE_PREFIX_PATH}/bin/sentry.dll"
|
||||
"${CMAKE_PREFIX_PATH}/bin/crashpad_handler.exe"
|
||||
DESTINATION ${_out_dir}
|
||||
)
|
||||
endif()
|
||||
|
||||
file(COPY ${CMAKE_PREFIX_PATH}/bin/occt/TKBO.dll
|
||||
${CMAKE_PREFIX_PATH}/bin/occt/TKBRep.dll
|
||||
${CMAKE_PREFIX_PATH}/bin/occt/TKCAF.dll
|
||||
@@ -789,6 +814,8 @@ function(Snapmaker_Orca_copy_dlls target config postfix output_dlls)
|
||||
${_out_dir}/TKXSBase.dll
|
||||
|
||||
${_out_dir}/freetype.dll
|
||||
${_out_dir}/sentry.dll
|
||||
${_out_dir}/crashpad_handler.exe
|
||||
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user