Files @ r26103:316b73a1be08
Branch filter:

Location: cpp/openttd-patchpack/source/cmake/Endian.cmake

Michael Lutz
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.

When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
# 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()