first commit

This commit is contained in:
2019-08-20 15:53:47 +08:00
commit f8a3ff0879
10 changed files with 393 additions and 0 deletions

31
system_bit.cmake Normal file
View File

@@ -0,0 +1,31 @@
macro(check_system_bits)
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")
endmacro()