From: Tim Goya Date: Sat, 3 Nov 2007 15:18:15 +0000 (+0000) Subject: Detect big-endianess and write it out to config.h X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=01b4f1b4e765f9508c3d881974196cc7bdfb5d32;p=supertux.git Detect big-endianess and write it out to config.h SVN-Revision: 5172 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 03a241517..945b47d97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,11 @@ OPTION(GENERATE_WRAPPER "Build miniswig and generate the wrapper" ${DEBUG}) set(CMAKE_MODULE_PATH ${SUPERTUX_SOURCE_DIR}/mk/cmake ${CMAKE_MODULE_PATH}) +## Check endianess + +INCLUDE(TestBigEndian) +TEST_BIG_ENDIAN(WORDS_BIGENDIAN) + ## Add lots of dependencies to compiler switches FIND_PACKAGE(SDL REQUIRED) diff --git a/config.h.cmake b/config.h.cmake index 28cd9e217..4d3d1cdbb 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -19,4 +19,6 @@ #define ICONV_CONST #endif +#cmakedefine WORDS_BIGENDIAN + #cmakedefine HAVE_OPENGL