Merging r38941 through r38950 from trunk into sox-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 2 Aug 2011 18:28:05 +0000 (18:28 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 2 Aug 2011 18:28:05 +0000 (18:28 +0000)
1  2 
CMakeLists.txt
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py

diff --combined CMakeLists.txt
index fba52ca664cb04286c7538134bd9f0a8e4476119,2d104ebfceaceda96936dbab6188699a69151b05..2ef487022e83e8ce2be472c0a6d09f550bf14600
@@@ -178,9 -178,6 +178,9 @@@ option(WITH_SAMPLERATE    "Enable sampl
  option(WITH_LZO           "Enable fast LZO compression (used for pointcache)" ON)
  option(WITH_LZMA          "Enable best LZMA compression, (used for pointcache)" ON)
  
 +# Tracking
 +option(WITH_LIBMV         "Enable libmv structure from motion library" ON)
 +
  # Misc
  option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
  option(WITH_RAYOPTIMIZATION   "Enable use of SIMD (SSE) optimizations for the raytracer" ON) 
@@@ -913,28 -910,15 +913,15 @@@ elseif(APPLE
        endif()
  
        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
+               # 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 "/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()
+               # normally cached but not since we include them with blender
+                 set(PYTHON_VERSION 3.2)
+               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
  
                # uncached vars
                set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
                set(SAMPLERATE_LIBPATH ${SAMPLERATE}/lib)
        endif()
  
-       set(PLATFORM_LINKLIBS stdc++ SystemStubs)
+       find_library(SYSTEMSTUBS_LIBRARY 
+               NAMES 
+               SystemStubs 
+               PATHS
+       )
+       mark_as_advanced(SYSTEMSTUBS_LIBRARY)
+       if(SYSTEMSTUBS_LIBRARY)
+               set(PLATFORM_LINKLIBS stdc++ SystemStubs)
+       else()
+               set(PLATFORM_LINKLIBS stdc++)
+       endif()
  
        if(WITH_COCOA)
                set(PLATFORM_CFLAGS "-pipe -funsigned-char -DGHOST_COCOA")
index 273303ac13767fe58ae82ac7139c5b6a50c16c43,6fae2785192a545092dd5befcb2a14065a0a116d..27326a2bb2de458c40c061b8d0a5030861309fe6
@@@ -206,6 -206,12 +206,12 @@@ def setup_staticlibs(lenv)
          if lenv['WITH_BF_STATICJEMALLOC']:
              statlibs += Split(lenv['BF_JEMALLOC_LIB_STATIC'])
  
+     if lenv['OURPLATFORM']=='linux2':
+         if lenv['WITH_BF_3DMOUSE']:
+             libincs += Split(lenv['BF_3DMOUSE_LIBPATH'])
+             if lenv['WITH_BF_STATIC3DMOUSE']:
+                 statlibs += Split(lenv['BF_3DMOUSE_LIB_STATIC'])
      return statlibs, libincs
  
  def setup_syslibs(lenv):
          if not lenv['WITH_BF_STATICJEMALLOC']:
              syslibs += Split(lenv['BF_JEMALLOC_LIB'])
  
+     if lenv['OURPLATFORM']=='linux2':
+         if lenv['WITH_BF_3DMOUSE']:
+             if not lenv['WITH_BF_STATIC3DMOUSE']:
+                 syslibs += Split(lenv['BF_3DMOUSE_LIB'])
      syslibs += lenv['LLIBS']
  
      return syslibs
@@@ -315,10 -326,6 +326,10 @@@ def creator(env)
      if not env['WITH_BF_SDL']:
          defs.append('DISABLE_SDL')
  
 +    if env['WITH_BF_LIBMV']:
 +        incs.append('#/extern/libmv')
 +        defs.append('WITH_LIBMV')
 +
      if env['WITH_BF_PYTHON']:
          incs.append('#/source/blender/python')
          defs.append('WITH_PYTHON')
index fbe29df21ba8e63edaab06a1da959a689828f183,b20f3ede68d0f95c6c64c1c03e514f40c1e759fe..3894eee0236ec679f28149b664cd7e8561f4b1b1
@@@ -438,6 -438,12 +438,12 @@@ def read_opts(env, cfg, args)
          (BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),
  
          (BoolVariable('WITH_BF_3DMOUSE', 'Build blender with support of 3D mouses', False)),
+         (BoolVariable('WITH_BF_STATIC3DMOUSE', 'Staticly link to 3d mouse library', False)),
+         ('BF_3DMOUSE', '3d mouse library base path', ''),
+         ('BF_3DMOUSE_INC', '3d mouse library include path', ''),
+         ('BF_3DMOUSE_LIB', '3d mouse library', ''),
+         ('BF_3DMOUSE_LIBPATH', '3d mouse library path', ''),
+         ('BF_3DMOUSE_LIB_STATIC', '3d mouse static library', ''),
  
          ('CFLAGS', 'C only flags', []),
          ('CCFLAGS', 'Generic C and C++ flags', []),
          (BoolVariable('WITH_BF_LZO', 'Enable fast LZO pointcache compression', True)),
          (BoolVariable('WITH_BF_LZMA', 'Enable best LZMA pointcache compression', True)),
          
 +        (BoolVariable('WITH_BF_LIBMV', 'Enable libmv structure from motion library', True)),
 +
          ('BF_X264_CONFIG', 'configuration flags for x264', ''),
          ('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
  #        (BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),