From 92cc3b1ed1c2bead0cc7e733fba0f5eab7cf10ce Mon Sep 17 00:00:00 2001 From: Davide Prade Date: Fri, 16 Feb 2024 14:35:48 +0100 Subject: [PATCH] Fixed the CMake file because under MSYS2 it always forced 32bit compilation even on 64bit machine. (#661) Co-authored-by: Davide Prade --- CMakeLists.txt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ccf44a..a8605fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,13 +104,6 @@ ADD_DEFINITIONS(-Du_int8_t=uint8_t -Du_int16_t=uint16_t) IF(MINGW) IF (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") - # force MinGW-w64 in 32bit mode - SET(CMAKE_C_FLAGS "-m32 ${CMAKE_C_FLAGS}") - SET(CMAKE_MODULE_LINKER_FLAGS "-m32 -Wl,--enable-stdcall-fixup ${CMAKE_SHARED_LINKER_FLAGS}") - SET(CMAKE_SHARED_LINKER_FLAGS "-m32 -Wl,--enable-stdcall-fixup ${CMAKE_SHARED_LINKER_FLAGS}") - SET(CMAKE_EXE_LINKER_FLAGS "-m32 -Wl,--enable-stdcall-fixup ${CMAKE_EXE_LINKER_FLAGS}") - SET(CMAKE_RC_FLAGS "--target=pe-i386 --output-format=coff ${CMAKE_RC_FLAGS}") - ELSE(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86") # force MinGW-w64 in 32bit mode MESSAGE("Building 32-bit Windows DLL") @@ -119,7 +112,7 @@ IF(MINGW) #SET(CMAKE_SHARED_LINKER_FLAGS "--Wl,--enable-stdcall-fixup ${CMAKE_SHARED_LINKER_FLAGS}") #SET(CMAKE_EXE_LINKER_FLAGS "--Wl,--enable-stdcall-fixup ${CMAKE_EXE_LINKER_FLAGS}") SET(CMAKE_RC_FLAGS "--target=pe-i386 --output-format=coff ${CMAKE_RC_FLAGS}") - ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + ELSEIF((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")) MESSAGE("Building 64-bit Windows DLL") SET(CMAKE_RC_FLAGS "--target=pe-x86-64 --output-format=coff ${CMAKE_RC_FLAGS}") ELSE(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")