Fixed 32-bit.

This commit is contained in:
XMRig 2019-08-02 10:54:00 +07:00
parent 37710b0c7b
commit 718be7e9aa
3 changed files with 26 additions and 2 deletions

View file

@ -34,7 +34,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
endif()
if (WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -Wl,--large-address-aware")
endif()
else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
endif()