mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
15 lines
361 B
CMake
15 lines
361 B
CMake
# Add the definitions to indicate which endian we are building for.
|
|
#
|
|
# add_endian_definition()
|
|
#
|
|
function(add_endian_definition)
|
|
include(TestBigEndian)
|
|
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
|
|
|
|
if(IS_BIG_ENDIAN)
|
|
add_definitions(-DTTD_ENDIAN=TTD_BIG_ENDIAN)
|
|
else()
|
|
add_definitions(-DTTD_ENDIAN=TTD_LITTLE_ENDIAN)
|
|
endif()
|
|
endfunction()
|