mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Use native CMake support for detecting architecture size
This commit is contained in:
parent
5f87a04111
commit
37575e4ed7
@ -5,12 +5,10 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
# don't use the OpenGL ES implementation on Windows
|
||||
set(OPENGL_ES 0)
|
||||
|
||||
# detect the architecture (note: this test won't work for cross-compilation)
|
||||
include(CheckTypeSize)
|
||||
check_type_size(void* SIZEOF_VOID_PTR)
|
||||
if(${SIZEOF_VOID_PTR} STREQUAL "4")
|
||||
# detect the architecture
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(ARCH_32BITS 1)
|
||||
elseif(${SIZEOF_VOID_PTR} STREQUAL "8")
|
||||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(ARCH_64BITS 1)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported architecture")
|
||||
|
Loading…
Reference in New Issue
Block a user