mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-22 19:01:12 +00:00
- allow compiling for win-arm64
This commit is contained in:
parent
7d6f3797c4
commit
6ef8118b80
3 changed files with 21 additions and 3 deletions
|
@ -29,7 +29,7 @@
|
|||
# "There are many more known variants/revisions that we do not handle/detect."
|
||||
|
||||
set(archdetect_c_code "
|
||||
#if defined(__arm__) || defined(__TARGET_ARCH_ARM)
|
||||
#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM64)
|
||||
#if defined(__ARM_ARCH_7__) \\
|
||||
|| defined(__ARM_ARCH_7A__) \\
|
||||
|| defined(__ARM_ARCH_7R__) \\
|
||||
|
|
|
@ -20,6 +20,8 @@ else()
|
|||
find_package( ZMusic REQUIRED )
|
||||
endif()
|
||||
|
||||
message("Building for target architecture: ${ZDOOM_TARGET_ARCH}")
|
||||
|
||||
if( MSVC AND NOT ZMUSIC_FOUND )
|
||||
# Use prebuilt library
|
||||
set( ZMUSIC_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../bin/windows/zmusic" )
|
||||
|
@ -27,7 +29,7 @@ if( MSVC AND NOT ZMUSIC_FOUND )
|
|||
set( ZMUSIC_LIBRARIES zmusic )
|
||||
if( ${ZDOOM_TARGET_ARCH} MATCHES "x86_64" )
|
||||
link_directories( ${ZMUSIC_ROOT_PATH}/64bit )
|
||||
elseif( ${ZDOOM_TARGET_ARCH} MATCHES "arm64" )
|
||||
elseif( ${ZDOOM_TARGET_ARCH} MATCHES "arm" )
|
||||
link_directories( ${ZMUSIC_ROOT_PATH}/arm64 )
|
||||
else()
|
||||
link_directories( ${ZMUSIC_ROOT_PATH}/32bit )
|
||||
|
@ -427,7 +429,6 @@ endif()
|
|||
set( PLAT_WIN32_SOURCES
|
||||
win32/i_steam.cpp
|
||||
common/platform/win32/hardware.cpp
|
||||
common/platform/win32/i_crash.cpp
|
||||
common/platform/win32/i_input.cpp
|
||||
common/platform/win32/i_keyboard.cpp
|
||||
common/platform/win32/i_mouse.cpp
|
||||
|
@ -448,6 +449,15 @@ set( PLAT_WIN32_SOURCES
|
|||
if (HAVE_VULKAN)
|
||||
set (PLAT_WIN32_SOURCES ${PLAT_WIN32_SOURCES} common/platform/win32/win32vulkanvideo.cpp )
|
||||
endif()
|
||||
|
||||
# todo: implement an actual crash catcher for ARM
|
||||
# for now this is purely experimental
|
||||
if (NOT ${ZDOOM_TARGET_ARCH} MATCHES "arm" )
|
||||
set (PLAT_WIN32_SOURCES ${PLAT_WIN32_SOURCES} common/platform/win32/i_crash.cpp )
|
||||
endif()
|
||||
if (MSVC AND ${ZDOOM_TARGET_ARCH} MATCHES "arm")
|
||||
add_definitions( -DNO_SSE -D__ARM__ -DRAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN)
|
||||
endif()
|
||||
|
||||
set( PLAT_POSIX_SOURCES
|
||||
posix/i_steam.cpp
|
||||
|
|
|
@ -1080,6 +1080,7 @@ void CALLBACK ExitFatally (ULONG_PTR dummy)
|
|||
exit(-1);
|
||||
}
|
||||
|
||||
#ifndef _M_ARM64
|
||||
//==========================================================================
|
||||
//
|
||||
// CatchAllExceptions
|
||||
|
@ -1132,6 +1133,7 @@ LONG WINAPI CatchAllExceptions (LPEXCEPTION_POINTERS info)
|
|||
}
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
}
|
||||
#endif // !_M_ARM64
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -1155,7 +1157,11 @@ static void infiniterecursion(int foo)
|
|||
// which offers the very important feature to open a debugger and see the crash in context right away.
|
||||
CUSTOM_CVAR(Bool, disablecrashlog, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
{
|
||||
#ifndef _M_ARM64
|
||||
SetUnhandledExceptionFilter(!*self ? CatchAllExceptions : nullptr);
|
||||
#else
|
||||
SetUnhandledExceptionFilter(nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -1217,7 +1223,9 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE nothing, LPWSTR cmdline, int
|
|||
#ifndef _DEBUG
|
||||
if (MainThread != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
#ifndef _M_ARM64
|
||||
SetUnhandledExceptionFilter (CatchAllExceptions);
|
||||
#endif
|
||||
|
||||
#ifdef _M_X64
|
||||
static bool setJumpResult = false;
|
||||
|
|
Loading…
Reference in a new issue