Merge 96e6b0c36b into 533518c7dd
This commit is contained in:
commit
40008dbee9
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
if(NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE)
|
||||
|
|
@ -15,7 +15,6 @@ endif()
|
|||
|
||||
include(CheckCCompilerFlag)
|
||||
include(CMakeDependentOption)
|
||||
include(TestBigEndian)
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION")
|
||||
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DETHRACE_VERSION)
|
||||
|
|
@ -86,7 +85,16 @@ function(add_compile_flags_if_supported TARGET)
|
|||
endforeach()
|
||||
endfunction()
|
||||
|
||||
test_big_endian(IS_BIGENDIAN)
|
||||
if(CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN")
|
||||
set(WORDS_BIGENDIAN TRUE)
|
||||
add_definitions(-DBR_ENDIAN_BIG=1 -DBR_ENDIAN_LITTLE=0)
|
||||
elseif(CMAKE_C_BYTE_ORDER STREQUAL "LITTLE_ENDIAN")
|
||||
set(WORDS_BIGENDIAN FALSE)
|
||||
add_definitions(-DBR_ENDIAN_BIG=0 -DBR_ENDIAN_LITTLE=1)
|
||||
else()
|
||||
set(WORDS_BIGENDIAN FALSE)
|
||||
message(WARNING "Endianness could not be determined.")
|
||||
endif()
|
||||
|
||||
set(count_sdl_platforms 0)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue