Cycles: svn merge -r40266:40358 https://svn.blender.org/svnroot/bf-blender/trunk...
[blender-staging.git] / CMakeLists.txt
index 3620b7dc2d1f2ffae8559e85d17083666ac2cf23..7194dd4b7dab397facfd33127fcfa300d8070817 100644 (file)
@@ -106,6 +106,7 @@ set(INCLUDE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/include 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)
@@ -1273,6 +1274,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