diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 56c106590..beaeb3a66 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -184,8 +184,8 @@ endif() # TODO: build this with the game if(${CMAKE_SYSTEM} MATCHES Windows AND ${CMAKE_C_COMPILER_ID} MATCHES "GNU" AND ${SRB2_SYSTEM_BITS} EQUAL 32) target_link_libraries(SRB2SDL2 PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}/../libs/drmingw/lib/win32/libexchndl.a" - "${CMAKE_CURRENT_SOURCE_DIR}/../libs/drmingw/lib/win32/libmgwhelp.a" + "${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/drmingw/lib/win32/libexchndl.a" + "${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/drmingw/lib/win32/libmgwhelp.a" ) target_include_directories(SRB2SDL2 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../libs/drmingw/include") endif() diff --git a/thirdparty/drmingw/include/exchndl.h b/thirdparty/drmingw/include/exchndl.h new file mode 100644 index 000000000..37dafb88e --- /dev/null +++ b/thirdparty/drmingw/include/exchndl.h @@ -0,0 +1,39 @@ +/* + * Copyright 2002-2015 Jose Fonseca + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#pragma once + + +#include + + +// Set the unhandled exception handler. +// Must be called when exchndll.dll is statically loaded (as opposed to loaded +// dynamically via LoadLibrary) +EXTERN_C VOID APIENTRY +ExcHndlInit(void); + + +// Override the report file name. +// +// Default is prog_name.RPT, in the same directory as the main executable. +// +// You can also pass "-" for stderr. +EXTERN_C BOOL APIENTRY +ExcHndlSetLogFileNameA(const char *szLogFileName); diff --git a/thirdparty/drmingw/lib/win32/libexchndl.a b/thirdparty/drmingw/lib/win32/libexchndl.a new file mode 100644 index 000000000..cd462a0df Binary files /dev/null and b/thirdparty/drmingw/lib/win32/libexchndl.a differ diff --git a/thirdparty/drmingw/lib/win32/libmgwhelp.a b/thirdparty/drmingw/lib/win32/libmgwhelp.a new file mode 100644 index 000000000..330cb52fe Binary files /dev/null and b/thirdparty/drmingw/lib/win32/libmgwhelp.a differ