From 83a2f02a78cd01aaf31b9b4ae8a217a1ecea6a49 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 19 Sep 2011 08:02:17 +0000 Subject: cleanup endian handling - define __BIG_ENDIAN__ or __LITTLE_ENDIAN__ with cmake & scons. - ENDIAN_ORDER is now a define rather than a global short. - replace checks like this with single ifdef: #if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__) - remove BKE_endian.h which isn't used --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d6e6bf06f31..2c0e069cf5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,6 +105,7 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE ) get_blender_version() + # Blender internal features option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON) mark_as_advanced(WITH_BLENDER) @@ -1150,6 +1151,18 @@ if(WITH_RAYOPTIMIZATION) unset(_sse2) endif() + +# set the endian define +include(TestBigEndian) +test_big_endian(_SYSTEM_BIG_ENDIAN) +if(_SYSTEM_BIG_ENDIAN) + add_definitions(-D__BIG_ENDIAN__) +else() + add_definitions(-D__LITTLE_ENDIAN__) +endif() +unset(_SYSTEM_BIG_ENDIAN) + + if(WITH_IMAGE_OPENJPEG) if(UNIX AND NOT APPLE) # dealt with above -- cgit v1.2.3