Fixed the CMake file because under MSYS2 it always forced 32bit compilation even on 64bit machine. (#661)
Co-authored-by: Davide Prade <dprade@olari.it>
This commit is contained in:
parent
9dc65e4075
commit
92cc3b1ed1
1 changed files with 1 additions and 8 deletions
|
@ -104,13 +104,6 @@ ADD_DEFINITIONS(-Du_int8_t=uint8_t -Du_int16_t=uint16_t)
|
||||||
|
|
||||||
IF(MINGW)
|
IF(MINGW)
|
||||||
IF (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
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")
|
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
|
||||||
# force MinGW-w64 in 32bit mode
|
# force MinGW-w64 in 32bit mode
|
||||||
MESSAGE("Building 32-bit Windows DLL")
|
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_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_EXE_LINKER_FLAGS "--Wl,--enable-stdcall-fixup ${CMAKE_EXE_LINKER_FLAGS}")
|
||||||
SET(CMAKE_RC_FLAGS "--target=pe-i386 --output-format=coff ${CMAKE_RC_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")
|
MESSAGE("Building 64-bit Windows DLL")
|
||||||
SET(CMAKE_RC_FLAGS "--target=pe-x86-64 --output-format=coff ${CMAKE_RC_FLAGS}")
|
SET(CMAKE_RC_FLAGS "--target=pe-x86-64 --output-format=coff ${CMAKE_RC_FLAGS}")
|
||||||
ELSE(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
|
ELSE(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
|
||||||
|
|
Loading…
Reference in a new issue