[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49655] trunk/blender/CMakeLists.txt: OSX/ cmake: refactoring of setting endianess defines, this fixes compile of builds with endianess other than the buildmachine and avoids also failing configuration with xcode 4 .4 due not supporting big_endian archs anymore

jens verwiebe info at jensverwiebe.de
Tue Aug 7 15:51:19 CEST 2012


Revision: 49655
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49655
Author:   jensverwiebe
Date:     2012-08-07 13:51:19 +0000 (Tue, 07 Aug 2012)
Log Message:
-----------
OSX/cmake: refactoring of setting endianess defines, this fixes compile of builds with endianess other than the buildmachine and avoids also failing configuration with xcode 4.4 due not supporting big_endian archs anymore

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt	2012-08-07 13:38:35 UTC (rev 49654)
+++ trunk/blender/CMakeLists.txt	2012-08-07 13:51:19 UTC (rev 49655)
@@ -1483,11 +1483,16 @@
 if(MSVC)
 	# for some reason this fails on msvc
 	add_definitions(-D__LITTLE_ENDIAN__)
-elseif(APPLE)
-	if (${XCODE_VERSION} VERSION_GREATER 4.3)
-		# no more ppc support in xcode > 4.3
-		add_definitions(-D__LITTLE_ENDIAN__)
-	endif()
+	
+# OSX-Note: as we do crosscompiling with specific set architecture,
+# endianess-detection and autosetting is counterproductive
+# so we just set endianess according CMAKE_OSX_ARCHITECTURES
+
+elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
+	add_definitions(-D__LITTLE_ENDIAN__)
+elseif(CMAKE_OSX_ARCHITECTURES MATCHES ppc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc64)		
+	add_definitions(-D__BIG_ENDIAN__)
+	
 else()
 	include(TestBigEndian)
 	test_big_endian(_SYSTEM_BIG_ENDIAN)




More information about the Bf-blender-cvs mailing list