cmake: fix minor 64BIT checks

This commit is contained in:
Alibek Omarov 2021-10-27 21:22:32 +03:00
parent d7123abd50
commit 9fde15075b
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT 64BIT)
error("UNDONE: set 32 build flags")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
endif()
set(CMAKE_SIZEOF_VOID_P 4)
@ -73,7 +73,7 @@ endif()
# see documentation: https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/library-naming.md
include(LibraryNaming)
if(64BIT)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
message(STATUS "Building for 64 Bit")
else()
message(STATUS "Building for 32 Bit")