Index: code/branches/unity_build/cmake/tools/BuildUnits.cmake
===================================================================
--- code/branches/unity_build/cmake/tools/BuildUnits.cmake	(revision 8652)
+++ code/branches/unity_build/cmake/tools/BuildUnits.cmake	(revision 8653)
@@ -50,4 +50,5 @@
   # However we can specify different values in a config file
   SET(_config ${BUILD_UNITS_CONFIG_${NR_OF_BUILD_UNITS}_THREADS})
+  SET(_nr_of_units)
   IF(_config)
     LIST(FIND _config ${_target_name} _index)
@@ -59,6 +60,10 @@
   ENDIF()
   IF(NOT _nr_of_units)
-    # Use default
-    SET(_nr_of_units NR_OF_BUILD_UNITS)
+    # Use default as specified (e.g. "full4" --> 4) or 1 for externals
+    IF(_arg_ORXONOX_EXTERNAL)
+      SET(_nr_of_units 1)
+    ELSE()
+      SET(_nr_of_units ${NR_OF_BUILD_UNITS})
+    ENDIF()
   ENDIF()
 
@@ -113,5 +118,8 @@
 
       # Generate the filename
-      SET(_unit_file ${CMAKE_CURRENT_BINARY_DIR}/${_target_name}BuildUnit${_unit_nr}.cc)
+      IF(NOT _nr_of_units EQUAL 1)
+        SET(_suffix ${_unit_nr})
+      ENDIF()
+      SET(_unit_file ${CMAKE_CURRENT_BINARY_DIR}/${_target_name}BuildUnit${_suffix}.cc)
       # Only write if content has changed (avoids recompile)
       IF(EXISTS ${_unit_file})
Index: code/branches/unity_build/cmake/tools/TargetUtilities.cmake
===================================================================
--- code/branches/unity_build/cmake/tools/TargetUtilities.cmake	(revision 8652)
+++ code/branches/unity_build/cmake/tools/TargetUtilities.cmake	(revision 8653)
@@ -40,4 +40,5 @@
  #      NO_INSTALL:        Do not install the target at all
  #      NO_VERSION:        Prevents adding any version to a target
+ #      NO_BUILD_UNITS:    Disables automatic (full) build units
  #
  #    Lists:
@@ -91,5 +92,6 @@
   SET(_switches   FIND_HEADER_FILES  EXCLUDE_FROM_ALL  ORXONOX_EXTERNAL
                   NO_DLL_INTERFACE   NO_SOURCE_GROUPS  PCH_NO_DEFAULT 
-                  NO_INSTALL         NO_VERSION        ${_additional_switches})
+                  NO_INSTALL         NO_VERSION        NO_BUILD_UNITS
+                  ${_additional_switches})
   SET(_list_names LINK_LIBRARIES     VERSION           SOURCE_FILES
                   DEFINE_SYMBOL      TOLUA_FILES       PCH_FILE
@@ -202,6 +204,9 @@
 
   # Full build units
-  IF(NOT _arg_ORXONOX_EXTERNAL AND ENABLE_BUILD_UNITS MATCHES "full")
-    GENERATE_BUILD_UNITS(${_target_name} _${_target_name}_files)
+  IF(ENABLE_BUILD_UNITS AND NOT _arg_NO_BUILD_UNITS)
+    # Use full build units even in partial mode for externals
+    IF(ENABLE_BUILD_UNITS MATCHES "full" OR _arg_ORXONOX_EXTERNAL)
+      GENERATE_BUILD_UNITS(${_target_name} _${_target_name}_files)
+    ENDIF()
   ENDIF()
 
Index: code/branches/unity_build/src/external/bullet/BulletCollision/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/bullet/BulletCollision/CMakeLists.txt	(revision 8652)
+++ code/branches/unity_build/src/external/bullet/BulletCollision/CMakeLists.txt	(revision 8653)
@@ -1,5 +1,3 @@
 ADD_SOURCE_FILES(BULLET_FILES
-
-BUILD_UNIT BulletCollisionBuildUnit.cpp
 
 	BroadphaseCollision/btAxisSweep3.cpp
@@ -84,12 +82,9 @@
 	NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
 	NarrowPhaseCollision/btPersistentManifold.cpp
+	NarrowPhaseCollision/btPolyhedralContactClipping.cpp
 	NarrowPhaseCollision/btRaycastCallback.cpp
 	NarrowPhaseCollision/btSubSimplexConvexCast.cpp
 	NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
 
-END_BUILD_UNIT
-
-    # Raises compiler errors when compiled inside the build unit
-	NarrowPhaseCollision/btPolyhedralContactClipping.cpp
 
 	# Headers
Index: code/branches/unity_build/src/external/bullet/BulletDynamics/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/bullet/BulletDynamics/CMakeLists.txt	(revision 8652)
+++ code/branches/unity_build/src/external/bullet/BulletDynamics/CMakeLists.txt	(revision 8653)
@@ -1,5 +1,3 @@
 ADD_SOURCE_FILES(BULLET_FILES
-
-BUILD_UNIT BulletDynamicsBuildUnit.cpp
 
 	Character/btKinematicCharacterController.cpp
@@ -25,6 +23,4 @@
 	Vehicle/btRaycastVehicle.cpp
 	Vehicle/btWheelInfo.cpp
-
-END_BUILD_UNIT
 
 	# Headers
Index: code/branches/unity_build/src/external/bullet/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/bullet/CMakeLists.txt	(revision 8652)
+++ code/branches/unity_build/src/external/bullet/CMakeLists.txt	(revision 8653)
@@ -32,4 +32,6 @@
   VERSION
     2.78
+  EXCLUDE_FROM_BUILD_UNITS
+    BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
   SOURCE_FILES
     ${BULLET_FILES}
Index: code/branches/unity_build/src/external/bullet/LinearMath/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/bullet/LinearMath/CMakeLists.txt	(revision 8652)
+++ code/branches/unity_build/src/external/bullet/LinearMath/CMakeLists.txt	(revision 8653)
@@ -1,5 +1,4 @@
 ADD_SOURCE_FILES(BULLET_FILES
 
-BUILD_UNIT BulletLinearMathBuildUnit.cpp
 	btAlignedAllocator.cpp
 	btConvexHull.cpp
@@ -8,5 +7,4 @@
 	btQuickprof.cpp
 	btSerializer.cpp
-END_BUILD_UNIT
 
 	# Headers
Index: code/branches/unity_build/src/external/ogreceguirenderer/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/ogreceguirenderer/CMakeLists.txt	(revision 8652)
+++ code/branches/unity_build/src/external/ogreceguirenderer/CMakeLists.txt	(revision 8653)
@@ -23,9 +23,7 @@
   OgreCEGUITexture.h
 
-BUILD_UNIT OgreCEGUIRendererBuildUnit.cpp
   OgreCEGUIRenderer.cpp
   OgreCEGUIResourceProvider.cpp
   OgreCEGUITexture.cpp
-END_BUILD_UNIT
 )
 
Index: code/branches/unity_build/src/external/ois/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/ois/CMakeLists.txt	(revision 8652)
+++ code/branches/unity_build/src/external/ois/CMakeLists.txt	(revision 8653)
@@ -34,12 +34,5 @@
   OISObject.h
   OISPrereqs.h
-)
 
-# Put everything into one single build unit (doens't work on OS X though)
-IF(NOT APPLE)
-  ADD_SOURCE_FILES(OIS_FILES BUILD_UNIT OISBuildUnit.cpp)
-ENDIF()
-
-ADD_SOURCE_FILES(OIS_FILES
   OISEffect.cpp
   OISException.cpp
@@ -50,4 +43,5 @@
   OISObject.cpp
 )
+
 IF(WIN32)
   ADD_SUBDIRECTORY(win32)
@@ -58,12 +52,12 @@
 ENDIF()
 
-# Close build unit from above
-IF(NOT APPLE)
-  ADD_SOURCE_FILES(OIS_FILES END_BUILD_UNIT)
-ENDIF()
-
 # MinGW doesn't come with some required Windows headers
 IF(MINGW)
   INCLUDE_DIRECTORIES(${WMI_INCLUDE_DIR})
+ENDIF()
+
+# Apple has problems with OIS and build units
+IF(APPLE)
+  SET(USE_BUILD_UNITS NO_BUILD_UNITS)
 ENDIF()
 
@@ -82,4 +76,5 @@
   LINK_LIBS_LINUX
     X11
+  ${USE_BUILD_UNITS}
   SOURCE_FILES
     ${OIS_FILES}
Index: code/branches/unity_build/src/external/tinyxml/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/tinyxml/CMakeLists.txt	(revision 8652)
+++ code/branches/unity_build/src/external/tinyxml/CMakeLists.txt	(revision 8653)
@@ -24,5 +24,4 @@
   tinyxml.h
 
-BUILD_UNIT TicppBuildUnit.cpp
   ticpp.cpp
   tinystr.cpp
@@ -30,5 +29,4 @@
   tinyxmlerror.cpp
   tinyxmlparser.cpp
-END_BUILD_UNIT
 )
 
