Detect big-endianess and write it out to config.h
authorTim Goya <tuxdev103@gmail.com>
Sat, 3 Nov 2007 15:18:15 +0000 (15:18 +0000)
committerTim Goya <tuxdev103@gmail.com>
Sat, 3 Nov 2007 15:18:15 +0000 (15:18 +0000)
SVN-Revision: 5172

CMakeLists.txt
config.h.cmake

index 03a2415..945b47d 100644 (file)
@@ -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)
index 28cd9e2..4d3d1cd 100644 (file)
@@ -19,4 +19,6 @@
 #define ICONV_CONST
 #endif
 
+#cmakedefine WORDS_BIGENDIAN
+
 #cmakedefine HAVE_OPENGL