finished first version. but don't test.

This commit is contained in:
2020-08-22 19:30:16 +08:00
parent da5b7d6b9e
commit d7af0d0304
7 changed files with 180 additions and 115 deletions

28
system_bit.cmake Normal file
View File

@@ -0,0 +1,28 @@
IF(APPLE)
SET(HGL_BITS 64)
ELSE()
IF(ANDROID)
if(ANDROID_ABI MATCHES ".*64.*")
SET(HGL_BITS 64)
else()
SET(HGL_BITS 32)
endif()
ELSE()
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(HGL_BITS 64)
ELSE()
SET(HGL_BITS 32)
ENDIF()
endif()
endif()
IF(HGL_BITS EQUAL 32)
add_definitions(-DHGL_32_BITS)
add_definitions(-DHGL_POINTER_UINT=uint32)
ELSE()
add_definitions(-DHGL_64_BITS)
add_definitions(-DHGL_POINTER_UINT=uint64)
ENDIF()
Message("System is ${HGL_BITS} Bit")