Revision: 38444
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38444
Author:   psy-fi
Date:     2011-07-17 09:35:47 +0000 (Sun, 17 Jul 2011)
Log Message:
-----------
merge with trunk 38443

Modified Paths:
--------------
    branches/soc-2011-onion/CMakeLists.txt
    branches/soc-2011-onion/SConstruct
    branches/soc-2011-onion/build_files/scons/tools/btools.py
    branches/soc-2011-onion/doc/python_api/examples/bge.texture.py
    branches/soc-2011-onion/doc/python_api/rst/bgl.rst
    branches/soc-2011-onion/extern/binreloc/CMakeLists.txt
    branches/soc-2011-onion/extern/eltopo/CMakeLists.txt
    branches/soc-2011-onion/extern/glew/CMakeLists.txt
    branches/soc-2011-onion/extern/lzo/CMakeLists.txt
    branches/soc-2011-onion/intern/CMakeLists.txt
    branches/soc-2011-onion/intern/audaspace/CMakeLists.txt
    branches/soc-2011-onion/intern/boolop/CMakeLists.txt
    branches/soc-2011-onion/intern/bsp/CMakeLists.txt
    branches/soc-2011-onion/intern/ghost/CMakeLists.txt
    branches/soc-2011-onion/intern/ghost/GHOST_Types.h
    branches/soc-2011-onion/intern/ghost/SConscript
    branches/soc-2011-onion/intern/ghost/intern/GHOST_Debug.h
    branches/soc-2011-onion/intern/ghost/intern/GHOST_EventPrinter.cpp
    branches/soc-2011-onion/intern/ghost/intern/GHOST_EventPrinter.h
    branches/soc-2011-onion/intern/ghost/intern/GHOST_ISystem.cpp
    branches/soc-2011-onion/intern/ghost/intern/GHOST_NDOFManager.cpp
    branches/soc-2011-onion/intern/ghost/intern/GHOST_SystemWin32.cpp
    branches/soc-2011-onion/intern/ghost/intern/GHOST_SystemX11.cpp
    branches/soc-2011-onion/intern/ghost/intern/GHOST_SystemX11.h
    branches/soc-2011-onion/intern/mikktspace/mikktspace.c
    branches/soc-2011-onion/intern/smoke/CMakeLists.txt
    branches/soc-2011-onion/release/scripts/modules/bpy_extras/mesh_utils.py
    branches/soc-2011-onion/release/scripts/startup/bl_ui/properties_texture.py
    branches/soc-2011-onion/release/scripts/startup/bl_ui/space_node.py
    branches/soc-2011-onion/source/blender/avi/CMakeLists.txt
    branches/soc-2011-onion/source/blender/blenfont/CMakeLists.txt
    branches/soc-2011-onion/source/blender/blenkernel/CMakeLists.txt
    branches/soc-2011-onion/source/blender/blenkernel/SConscript
    branches/soc-2011-onion/source/blender/blenkernel/intern/pointcache.c
    branches/soc-2011-onion/source/blender/blenkernel/intern/smoke.c
    branches/soc-2011-onion/source/blender/blenkernel/intern/sound.c
    branches/soc-2011-onion/source/blender/blenlib/CMakeLists.txt
    branches/soc-2011-onion/source/blender/blenloader/CMakeLists.txt
    branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-onion/source/blender/blenloader/intern/writefile.c
    branches/soc-2011-onion/source/blender/blenpluginapi/CMakeLists.txt
    branches/soc-2011-onion/source/blender/collada/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/animation/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/armature/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/curve/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/datafiles/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/datafiles/preview.blend.c
    branches/soc-2011-onion/source/blender/editors/gpencil/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/interface/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/mesh/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/metaball/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/object/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/object/object_bake.c
    branches/soc-2011-onion/source/blender/editors/physics/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/physics/physics_fluid.c
    branches/soc-2011-onion/source/blender/editors/render/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/render/render_preview.c
    branches/soc-2011-onion/source/blender/editors/screen/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/sculpt_paint/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/sound/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_action/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_api/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_buttons/CMakeLists.txt
    
branches/soc-2011-onion/source/blender/editors/space_buttons/buttons_context.c
    branches/soc-2011-onion/source/blender/editors/space_file/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_graph/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_image/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_info/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_logic/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_nla/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_node/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_node/node_draw.c
    branches/soc-2011-onion/source/blender/editors/space_node/node_edit.c
    branches/soc-2011-onion/source/blender/editors/space_node/node_intern.h
    branches/soc-2011-onion/source/blender/editors/space_node/node_ops.c
    branches/soc-2011-onion/source/blender/editors/space_node/space_node.c
    branches/soc-2011-onion/source/blender/editors/space_outliner/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_script/CMakeLists.txt
    
branches/soc-2011-onion/source/blender/editors/space_sequencer/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_sound/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_text/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_time/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_userpref/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_view3d/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/space_view3d/view3d_buttons.c
    branches/soc-2011-onion/source/blender/editors/transform/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/util/CMakeLists.txt
    branches/soc-2011-onion/source/blender/editors/uvedit/CMakeLists.txt
    branches/soc-2011-onion/source/blender/gpu/CMakeLists.txt
    branches/soc-2011-onion/source/blender/gpu/SConscript
    branches/soc-2011-onion/source/blender/gpu/intern/gpu_draw.c
    branches/soc-2011-onion/source/blender/ikplugin/CMakeLists.txt
    branches/soc-2011-onion/source/blender/imbuf/CMakeLists.txt
    branches/soc-2011-onion/source/blender/imbuf/intern/cineon/CMakeLists.txt
    branches/soc-2011-onion/source/blender/imbuf/intern/dds/CMakeLists.txt
    branches/soc-2011-onion/source/blender/imbuf/intern/openexr/CMakeLists.txt
    branches/soc-2011-onion/source/blender/makesdna/DNA_particle_types.h
    branches/soc-2011-onion/source/blender/makesrna/intern/CMakeLists.txt
    branches/soc-2011-onion/source/blender/makesrna/intern/rna_constraint.c
    branches/soc-2011-onion/source/blender/makesrna/intern/rna_curve.c
    branches/soc-2011-onion/source/blender/modifiers/CMakeLists.txt
    branches/soc-2011-onion/source/blender/nodes/CMakeLists.txt
    branches/soc-2011-onion/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
    branches/soc-2011-onion/source/blender/nodes/intern/CMP_util.c
    branches/soc-2011-onion/source/blender/python/CMakeLists.txt
    branches/soc-2011-onion/source/blender/python/SConscript
    branches/soc-2011-onion/source/blender/python/generic/CMakeLists.txt
    branches/soc-2011-onion/source/blender/python/generic/bgl.c
    branches/soc-2011-onion/source/blender/python/intern/CMakeLists.txt
    branches/soc-2011-onion/source/blender/python/intern/bpy.c
    branches/soc-2011-onion/source/blender/python/intern/bpy_interface.c
    branches/soc-2011-onion/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-onion/source/blender/quicktime/CMakeLists.txt
    branches/soc-2011-onion/source/blender/render/CMakeLists.txt
    branches/soc-2011-onion/source/blender/render/SConscript
    branches/soc-2011-onion/source/blender/render/intern/source/voxeldata.c
    branches/soc-2011-onion/source/blender/windowmanager/CMakeLists.txt
    branches/soc-2011-onion/source/blender/windowmanager/intern/wm_files.c
    branches/soc-2011-onion/source/blenderplayer/CMakeLists.txt
    
branches/soc-2011-onion/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
    branches/soc-2011-onion/source/creator/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/BlenderRoutines/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/Converter/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/Expressions/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/Expressions/PyObjectPlus.h
    branches/soc-2011-onion/source/gameengine/GameLogic/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/GamePlayer/common/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/GamePlayer/ghost/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/Ketsji/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/Ketsji/KX_PyMath.h
    branches/soc-2011-onion/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/soc-2011-onion/source/gameengine/Ketsji/SConscript
    branches/soc-2011-onion/source/gameengine/Network/CMakeLists.txt
    
branches/soc-2011-onion/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/Physics/Bullet/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/Rasterizer/CMakeLists.txt
    
branches/soc-2011-onion/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
    branches/soc-2011-onion/source/gameengine/VideoTexture/CMakeLists.txt

Added Paths:
-----------
    branches/soc-2011-onion/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
    branches/soc-2011-onion/intern/ghost/intern/GHOST_DisplayManagerSDL.h
    branches/soc-2011-onion/intern/ghost/intern/GHOST_SystemSDL.cpp
    branches/soc-2011-onion/intern/ghost/intern/GHOST_SystemSDL.h
    branches/soc-2011-onion/intern/ghost/intern/GHOST_WindowSDL.cpp
    branches/soc-2011-onion/intern/ghost/intern/GHOST_WindowSDL.h
    branches/soc-2011-onion/source/blender/python/mathutils/
    branches/soc-2011-onion/source/blender/python/mathutils/CMakeLists.txt
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Color.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Color.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Euler.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Euler.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Matrix.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Matrix.h
    
branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Quaternion.c
    
branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Quaternion.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Vector.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Vector.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_geometry.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_geometry.h

Removed Paths:
-------------
    branches/soc-2011-onion/source/blender/python/generic/mathutils.c
    branches/soc-2011-onion/source/blender/python/generic/mathutils.h
    branches/soc-2011-onion/source/blender/python/generic/mathutils_Color.c
    branches/soc-2011-onion/source/blender/python/generic/mathutils_Color.h
    branches/soc-2011-onion/source/blender/python/generic/mathutils_Euler.c
    branches/soc-2011-onion/source/blender/python/generic/mathutils_Euler.h
    branches/soc-2011-onion/source/blender/python/generic/mathutils_Matrix.c
    branches/soc-2011-onion/source/blender/python/generic/mathutils_Matrix.h
    branches/soc-2011-onion/source/blender/python/generic/mathutils_Quaternion.c
    branches/soc-2011-onion/source/blender/python/generic/mathutils_Quaternion.h
    branches/soc-2011-onion/source/blender/python/generic/mathutils_Vector.c
    branches/soc-2011-onion/source/blender/python/generic/mathutils_Vector.h
    branches/soc-2011-onion/source/blender/python/generic/mathutils_geometry.c
    branches/soc-2011-onion/source/blender/python/generic/mathutils_geometry.h
    branches/soc-2011-onion/source/blender/python/mathutils/CMakeLists.txt
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Color.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Color.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Euler.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Euler.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Matrix.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Matrix.h
    
branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Quaternion.c
    
branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Quaternion.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Vector.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_Vector.h
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_geometry.c
    branches/soc-2011-onion/source/blender/python/mathutils/mathutils_geometry.h

Property Changed:
----------------
    branches/soc-2011-onion/
    branches/soc-2011-onion/doc/python_api/rst/bge.constraints.rst


Property changes on: branches/soc-2011-onion
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/trunk/blender:36833-38306
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/trunk/blender:36833-38443

Modified: branches/soc-2011-onion/CMakeLists.txt
===================================================================
--- branches/soc-2011-onion/CMakeLists.txt      2011-07-17 09:11:13 UTC (rev 
38443)
+++ branches/soc-2011-onion/CMakeLists.txt      2011-07-17 09:35:47 UTC (rev 
38444)
@@ -90,6 +90,9 @@
 get_blender_version()
 
 # Blender internal features
+option(WITH_BLENDER "Build blender (disable to build only the blender player)" 
ON)
+mark_as_advanced(WITH_BLENDER)
+
 option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
 
 option(WITH_PYTHON        "Enable Embedded Python API  (only disable for 
development)" ON)
@@ -106,12 +109,21 @@
 option(WITH_GAMEENGINE    "Enable Game Engine" ON)
 option(WITH_PLAYER        "Build Player" OFF)
 
-option(WITH_AUDASPACE    "Build with blenders audio library" ON)
-mark_as_advanced(WITH_AUDASPACE)
+# GHOST Windowing Library Options
+option(WITH_GHOST_DEBUG   "Enable debugging output for the GHOST library" OFF)
+mark_as_advanced(WITH_GHOST_DEBUG)
 
+option(WITH_GHOST_SDL    "Enable building blender against SDL for windowing 
rather then the native APIs" OFF)
+mark_as_advanced(WITH_GHOST_SDL)
+
+# Misc...
 option(WITH_HEADLESS      "Build without graphical support (renderfarm, server 
mode only)" OFF)
 mark_as_advanced(WITH_HEADLESS)
 
+option(WITH_AUDASPACE    "Build with blenders audio library (only disable if 
you know what you're doing!)" ON)
+mark_as_advanced(WITH_AUDASPACE)
+
+
 # (unix defaults to OpenMP On)
 if(UNIX AND NOT APPLE)
        option(WITH_OPENMP        "Enable OpenMP (has to be supported by the 
compiler)" ON)
@@ -129,6 +141,7 @@
 
 # Modifiers
 option(WITH_MOD_FLUID          "Enable Elbeem Modifier (Fluid Simulation)" ON)
+option(WITH_MOD_SMOKE          "Enable Smoke Modifier (Smoke Simulation)" ON)
 option(WITH_MOD_DECIMATE               "Enable Decimate Modifier" ON)
 option(WITH_MOD_BOOLEAN                "Enable Boolean Modifier" ON)
 option(WITH_MOD_CLOTH_ELTOPO           "Enable Experemental cloth solver" OFF)
@@ -202,6 +215,10 @@
 #-----------------------------------------------------------------------------
 # Check for conflicting/unsupported configurations
 
+if(NOT WITH_BLENDER AND NOT WITH_PLAYER)
+       message(FATAL_ERROR "At least one of WITH_BLENDER or WITH_PLAYER must 
be enabled, nothing to do!")
+endif()
+
 if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
        message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
 endif()
@@ -210,6 +227,10 @@
        message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG 
require WITH_AUDASPACE")
 endif()
 
+if(NOT WITH_SDL AND WITH_GHOST_SDL)
+       message(FATAL_ERROR "WITH_GHOST_SDL requires WITH_SDL to be ON")
+endif()
+
 if(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE)
        message(FATAL_ERROR "WITH_IMAGE_REDCODE requires WITH_IMAGE_OPENJPEG")
 endif()
@@ -434,7 +455,7 @@
        # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using 
--as-needed
        set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread -lstdc++")
 
-       if(NOT WITH_HEADLESS)
+       if((NOT WITH_HEADLESS) AND (NOT WITH_GHOST_SDL))
                find_package(X11 REQUIRED)
                find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h 
${X11_INC_SEARCH_PATH})
                mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
@@ -709,10 +730,14 @@
                endif()
 
                if(WITH_PYTHON)
-                       set(PYTHON_VERSION 3.2)
-                       set(PYTHON_INCLUDE_DIRS 
"${LIBDIR}/python/include/python${PYTHON_VERSION}")
-                       # set(PYTHON_BINARY python) # not used yet
-                       set(PYTHON_LIBRARIES ${LIBDIR}/python/lib/python32.lib)
+                       # normally cached but not since we include them with 
blender
+                       set(PYTHON_VERSION 3.2) # CACHE STRING)
+                       set(PYTHON_INCLUDE_DIR 
"${LIBDIR}/python/include/python${PYTHON_VERSION}") # CACHE PATH)
+                       set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python32.lib") 
#CACHE FILEPATH)
+
+                       # uncached vars
+                       set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+                       set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
                endif()
 
                set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 
/INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib 
/NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib")
@@ -812,12 +837,14 @@
                endif()
 
                if(WITH_PYTHON)
-                       set(PYTHON ${LIBDIR}/python)
-                       set(PYTHON_VERSION 3.2)
-                       set(PYTHON_INCLUDE_DIRS 
"${PYTHON}/include/python${PYTHON_VERSION}")
-                       # set(PYTHON_BINARY python) # not used yet
-                       set(PYTHON_LIBRARIES ${PYTHON}/lib/python32mw.lib)
-                       set(PYTHON_LIBPATH ${PYTHON}/lib)
+                       # normally cached but not since we include them with 
blender
+                       set(PYTHON_VERSION 3.2) #  CACHE STRING)
+                       set(PYTHON_INCLUDE_DIR 
"${LIBDIR}/python/include/python${PYTHON_VERSION}")  # CACHE PATH)
+                       set(PYTHON_LIBRARY 
"${LIBDIR}/python/lib/python32mw.lib")  # CACHE FILEPATH)
+
+                       # uncached vars
+                       set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+                       set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
                endif()
 
                set(PLATFORM_LINKFLAGS "--stack,2097152")
@@ -868,27 +895,33 @@
                set(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib)  # TODO, 
deprecate
        endif()
 
-       set(PYTHON_VERSION 3.2)
+       if(WITH_PYTHON)
+               set(PYTHON_VERSION 3.2)
+               if(PYTHON_VERSION MATCHES 3.2)
+                       # we use precompiled libraries for py 3.2 and up by 
default
 
-       if(PYTHON_VERSION MATCHES 3.2)
-               # we use precompiled libraries for py 3.2 and up by default
+                       # normally cached but not since we include them with 
blender
+                       set(PYTHON_INCLUDE_DIR 
"${LIBDIR}/python/include/python${PYTHON_VERSION}")
+                       # set(PYTHON_BINARY 
"${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
+                       set(PYTHON_LIBRARY python${PYTHON_VERSION})
+                       set(PYTHON_LIBPATH 
"${LIBDIR}/python/lib/python${PYTHON_VERSION}")
+                       # set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  
build with this enabled
+               else()
+                       # otherwise, use custom system framework
+                       # *not used but maintained incase some dev wants to*
 
-               set(PYTHON ${LIBDIR}/python)
-               set(PYTHON_INCLUDE_DIRS 
"${PYTHON}/include/python${PYTHON_VERSION}")
-               # set(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}") # 
not used yet
-               set(PYTHON_LIBRARIES python${PYTHON_VERSION})
-               set(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}")
-               # set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with 
this enabled
-       else()
-               # otherwise, use custom system framework
+                       set(PYTHON 
"/System/Library/Frameworks/Python.framework/Versions/" CACHE PATH)
+                       set(PYTHON_INCLUDE_DIR 
"${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE PATH)
+                       # set(PYTHON_BINARY 
${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
+                       set(PYTHON_LIBRARY "" CACHE FILEPATH)
+                       set(PYTHON_LIBPATH 
"${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config" CACHE PATH)
+                       set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System 
-framework Python" CACHE STRING)
+                       unset(PYTHON)
+               endif()
 
-               set(PYTHON 
/System/Library/Frameworks/Python.framework/Versions/)
-               set(PYTHON_VERSION 3.2)
-               set(PYTHON_INCLUDE_DIRS 
"${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}")
-               # set(PYTHON_BINARY 
${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
-               set(PYTHON_LIBRARIES "")
-               set(PYTHON_LIBPATH 
${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config)
-               set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System 
-framework Python")
+               # uncached vars
+               set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+               set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
        endif()
 
        if(WITH_INTERNATIONAL)
@@ -1187,6 +1220,20 @@
        endif()
 endif()
 
+
+# ensure python header is found since detection can fail, this could happen
+# with _any_ library but since we used a fixed python version this tends to
+# be most problematic.
+if(WITH_PYTHON)
+       if(NOT EXISTS "${PYTHON_INCLUDE_DIR}/Python.h")
+               message(FATAL_ERROR "Missing: 
\"${PYTHON_INCLUDE_DIR}/Python.h\",\n"
+                                                       "Set the cache entry 
'PYTHON_INCLUDE_DIR' to point "
+                                                       "to a valid python 
include path. Containing "
+                                                       "Python.h for python 
version \"${PYTHON_VERSION}\"")
+       endif()
+endif()
+
+
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
 
@@ -1215,7 +1262,9 @@
 
 #-----------------------------------------------------------------------------
 # Blender Application
-add_subdirectory(source/creator)
+if(WITH_BLENDER)
+       add_subdirectory(source/creator)
+endif()
 
 
 #-----------------------------------------------------------------------------

Modified: branches/soc-2011-onion/SConstruct
===================================================================
--- branches/soc-2011-onion/SConstruct  2011-07-17 09:11:13 UTC (rev 38443)
+++ branches/soc-2011-onion/SConstruct  2011-07-17 09:35:47 UTC (rev 38444)
@@ -361,6 +361,23 @@
         print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
     Exit()
 
+
+# ensure python header is found since detection can fail, this could happen
+# with _any_ library but since we used a fixed python version this tends to
+# be most problematic.
+if env['WITH_BF_PYTHON']:
+       py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, 
"Python.h")
+
+       if not os.path.exists(py_h):
+               print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep 
+ "Python.h\",\n"
+                         "  Set 'BF_PYTHON_INC' to point "
+                         "to a valid python include path.\n  Containing "
+                         "Python.h for python version \"" + 
env.subst('${BF_PYTHON_VERSION}') + "\"")
+
+               Exit()
+       del py_h
+
+
 if not os.path.isdir ( B.root_build_dir):
     os.makedirs ( B.root_build_dir )
     os.makedirs ( B.root_build_dir + 'source' )

Modified: branches/soc-2011-onion/build_files/scons/tools/btools.py
===================================================================
--- branches/soc-2011-onion/build_files/scons/tools/btools.py   2011-07-17 
09:11:13 UTC (rev 38443)
+++ branches/soc-2011-onion/build_files/scons/tools/btools.py   2011-07-17 
09:35:47 UTC (rev 38444)
@@ -121,6 +121,7 @@
             'BF_OPENMP_INC',
             'BF_OPENMP_LIBPATH',
             'WITH_GHOST_COCOA',
+            'WITH_GHOST_SDL',
             'USE_QTKIT',
             'BF_FANCY', 'BF_QUIET', 'BF_LINE_OVERWRITE',

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to