Skip to content

Commit

Permalink
sentry-native: Patch for compat with latest mingw headers
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Oct 29, 2023
1 parent cd2f003 commit c539e04
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/FetchSentryNative.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ FetchContent_Declare(
sentrynative
${_sentrynative_fetch_download_options}
SOURCE_DIR "${_sentrynative_source_dir}"
PATCH_COMMAND ${CMAKE_COMMAND} "-DSOURCE_DIR=<SOURCE_DIR>" -P "${CMAKE_SOURCE_DIR}/lib/exceptionhandler/3rdparty/sentry/PatchSentryNative.cmake"
)
FetchContent_GetProperties(sentrynative)
set(SENTRY_BUILD_SHARED_LIBS OFF CACHE BOOL "Sentry build shared libs" FORCE)
Expand Down
14 changes: 14 additions & 0 deletions lib/exceptionhandler/3rdparty/sentry/PatchSentryNative.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
if(NOT CMAKE_SCRIPT_MODE_FILE)
message(FATAL_ERROR "This script currently only supports being run via `cmake -P` script mode")
endif()
set(_fullPathToThisScript "${CMAKE_SCRIPT_MODE_FILE}")
get_filename_component(_scriptFolder "${_fullPathToThisScript}" DIRECTORY)

if((NOT DEFINED SOURCE_DIR) OR (SOURCE_DIR STREQUAL ""))
message(FATAL_ERROR "SOURCE_DIR must be specified on command-line")
endif()

# Remove compat/mingw/werapi.h (no longer needed)
if (EXISTS "${SOURCE_DIR}/external/crashpad/compat/mingw/werapi.h")
file(REMOVE "${SOURCE_DIR}/external/crashpad/compat/mingw/werapi.h")
endif()

0 comments on commit c539e04

Please sign in to comment.