mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
Proper detection of Intel 64-bit architecture
Size of pointer check was not enough
This commit is contained in:
parent
e38e1d6d77
commit
1c6cc3e28f
1 changed files with 9 additions and 1 deletions
|
@ -13,6 +13,7 @@ include( CheckIncludeFile )
|
|||
include( CheckIncludeFiles )
|
||||
include( CheckLibraryExists )
|
||||
include( FindPkgConfig )
|
||||
include( TargetArch )
|
||||
|
||||
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
||||
option( NO_STRIP "Do not strip Release or MinSizeRel builds" )
|
||||
|
@ -32,7 +33,9 @@ if( APPLE )
|
|||
option( OSX_COCOA_BACKEND "Use native Cocoa backend instead of SDL" ON )
|
||||
endif()
|
||||
|
||||
if( CMAKE_SIZEOF_VOID_P MATCHES "8" )
|
||||
target_architecture(ZDOOM_TARGET_ARCH)
|
||||
|
||||
if( ${ZDOOM_TARGET_ARCH} MATCHES "x86_64" )
|
||||
set( X64 64 )
|
||||
endif()
|
||||
|
||||
|
@ -347,6 +350,11 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
|||
endif ()
|
||||
endif ()
|
||||
|
||||
if( NOT X64 AND NOT CAN_DO_MFPMATH )
|
||||
set( CMAKE_C_FLAGS "-DNO_SSE ${CMAKE_CXX_FLAGS}" )
|
||||
set( CMAKE_CXX_FLAGS "-DNO_SSE ${CMAKE_CXX_FLAGS}" )
|
||||
endif()
|
||||
|
||||
# Use the highest C++ standard available since VS2015 compiles with C++14
|
||||
# but we only require C++11. The recommended way to do this in CMake is to
|
||||
# probably to use target_compile_features, but I don't feel like maintaining
|
||||
|
|
Loading…
Reference in a new issue