[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48718] branches/soc-2012-bratwurst: + SCons build for bf_fbx, bf_assimp and ext_assimp (off by default, not in config yet)

Alexander Gessler alexander.gessler at gmx.net
Sun Jul 8 02:00:51 CEST 2012


Revision: 48718
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48718
Author:   aramis_acg
Date:     2012-07-08 00:00:51 +0000 (Sun, 08 Jul 2012)
Log Message:
-----------
+ SCons build for bf_fbx, bf_assimp and ext_assimp (off by default, not in config yet)

Modified Paths:
--------------
    branches/soc-2012-bratwurst/build_files/scons/tools/btools.py
    branches/soc-2012-bratwurst/extern/SConscript
    branches/soc-2012-bratwurst/source/blender/SConscript
    branches/soc-2012-bratwurst/source/blender/windowmanager/SConscript

Added Paths:
-----------
    branches/soc-2012-bratwurst/extern/assimp/SConscript
    branches/soc-2012-bratwurst/source/blender/assimp/SConscript
    branches/soc-2012-bratwurst/source/blender/fbx/SConscript

Modified: branches/soc-2012-bratwurst/build_files/scons/tools/btools.py
===================================================================
--- branches/soc-2012-bratwurst/build_files/scons/tools/btools.py	2012-07-07 23:38:40 UTC (rev 48717)
+++ branches/soc-2012-bratwurst/build_files/scons/tools/btools.py	2012-07-08 00:00:51 UTC (rev 48718)
@@ -127,6 +127,8 @@
             'WITH_BF_FFTW3', 'BF_FFTW3', 'BF_FFTW3_INC', 'BF_FFTW3_LIB', 'BF_FFTW3_LIBPATH', 'WITH_BF_STATICFFTW3', 'BF_FFTW3_LIB_STATIC',
             'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
             'WITH_BF_COLLADA', 'BF_COLLADA', 'BF_COLLADA_INC', 'BF_COLLADA_LIB', 'BF_OPENCOLLADA', 'BF_OPENCOLLADA_INC', 'BF_OPENCOLLADA_LIB', 'BF_OPENCOLLADA_LIBPATH', 'BF_PCRE', 'BF_PCRE_LIB', 'BF_PCRE_LIBPATH', 'BF_EXPAT', 'BF_EXPAT_LIB', 'BF_EXPAT_LIBPATH',
+            'WITH_BF_ASSIMP',
+            'WITH_BF_FBX',
             'WITH_BF_PLAYER',
             'WITH_BF_NOBLENDER',
             'WITH_BF_BINRELOC',
@@ -457,6 +459,9 @@
         ('BF_EXPAT_LIB', 'Expat library', ''),
         ('BF_EXPAT_LIBPATH', 'Expat library path', ''),
         
+        (BoolVariable('WITH_BF_ASSIMP', 'Build assimp import module if true', False)),
+        (BoolVariable('WITH_BF_FBX', 'Build fbx import module if true (depends on WITH_BF_ASSIMP)', False)),
+        
         (BoolVariable('WITH_BF_JEMALLOC', 'Use jemalloc if true', False)),
         (BoolVariable('WITH_BF_STATICJEMALLOC', 'Staticly link to jemalloc', False)),
         ('BF_JEMALLOC', 'jemalloc base path', ''),

Modified: branches/soc-2012-bratwurst/extern/SConscript
===================================================================
--- branches/soc-2012-bratwurst/extern/SConscript	2012-07-07 23:38:40 UTC (rev 48717)
+++ branches/soc-2012-bratwurst/extern/SConscript	2012-07-08 00:00:51 UTC (rev 48718)
@@ -34,6 +34,9 @@
 
 if env['WITH_BF_CARVE']:
     SConscript(['carve/SConscript'])
+print(env)
+if env['WITH_BF_ASSIMP']:
+    SConscript(['assimp/SConscript'])
 
 if env['WITH_GHOST_XDND']:
     # FreeBSD doesn't seems to support XDND protocol

Added: branches/soc-2012-bratwurst/extern/assimp/SConscript
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/SConscript	                        (rev 0)
+++ branches/soc-2012-bratwurst/extern/assimp/SConscript	2012-07-08 00:00:51 UTC (rev 48718)
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+
+
+Import ('env')
+
+sources = env.Glob('code/*.cpp') + env.Glob('contrib/clipper/*.cpp') + env.Glob('contrib/ConvertUTF/*.c') +\
+    env.Glob('contrib/irrXML/*.cpp') + \
+    env.Glob('contrib/poly2tri/poly2tri/sweep/*.cc') + \
+    env.Glob('contrib/poly2tri/poly2tri/common/*.cc') + \
+    env.Glob('contrib/unzip/*.c') + \
+    env.Glob('contrib/zlib/*.c')
+
+defs = []
+incs = ['include']
+
+# configure boost build
+if env['WITH_BF_BOOST']:
+    incs.append(env['BF_BOOST_INC'])
+else:
+    defs.append('ASSIMP_BUILD_BOOST_WORKAROUND')
+    incs.append('code/BoostWorkaround')
+
+# source code for these is not even in the blender repository for obvious reasons
+defs.append('ASSIMP_BUILD_NO_COLLADA_IMPORTER')
+defs.append('ASSIMP_BUILD_NO_BLEND_IMPORTER')
+
+env.BlenderLib ('extern_assimp', Split(sources), incs, defs, libtype=['extern'], priority=[40] )

Modified: branches/soc-2012-bratwurst/source/blender/SConscript
===================================================================
--- branches/soc-2012-bratwurst/source/blender/SConscript	2012-07-07 23:38:40 UTC (rev 48717)
+++ branches/soc-2012-bratwurst/source/blender/SConscript	2012-07-08 00:00:51 UTC (rev 48718)
@@ -38,6 +38,12 @@
 if env['WITH_BF_COLLADA']:
     SConscript (['collada/SConscript'])
     
+if env['WITH_BF_ASSIMP']:
+    SConscript (['assimp/SConscript'])
+
+if env['WITH_BF_FBX']:
+    SConscript (['fbx/SConscript'])
+
 if env['WITH_BF_COMPOSITOR']:
     SConscript (['compositor/SConscript',
                  'opencl/SConscript'])

Added: branches/soc-2012-bratwurst/source/blender/assimp/SConscript
===================================================================
--- branches/soc-2012-bratwurst/source/blender/assimp/SConscript	                        (rev 0)
+++ branches/soc-2012-bratwurst/source/blender/assimp/SConscript	2012-07-08 00:00:51 UTC (rev 48718)
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The Original Code is Copyright (C) 2006, Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): Alexander Gessler 
+#
+# ***** END GPL LICENSE BLOCK *****
+
+Import ('env')
+
+sources = env.Glob('*.cpp')
+defs = []
+
+incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../blenloader ../makesrna ../editors/include ../imbuf ../../../intern/guardedalloc' 
+
+if env['BF_BUILDINFO']:
+    defs.append('WITH_BUILDINFO')
+
+env.BlenderLib ('bf_assimp', sources, Split(incs), defs, libtype='core', priority=200 )

Added: branches/soc-2012-bratwurst/source/blender/fbx/SConscript
===================================================================
--- branches/soc-2012-bratwurst/source/blender/fbx/SConscript	                        (rev 0)
+++ branches/soc-2012-bratwurst/source/blender/fbx/SConscript	2012-07-08 00:00:51 UTC (rev 48718)
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The Original Code is Copyright (C) 2006, Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): Alexander Gessler 
+#
+# ***** END GPL LICENSE BLOCK *****
+
+Import ('env')
+
+sources = env.Glob('*.cpp')
+defs = []
+
+incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../blenloader ../makesrna ../editors/include ../imbuf ../../../intern/guardedalloc' 
+
+if env['BF_BUILDINFO']:
+    defs.append('WITH_BUILDINFO')
+
+env.BlenderLib ('bf_fbx', sources, Split(incs), defs, libtype='core', priority=200 )

Modified: branches/soc-2012-bratwurst/source/blender/windowmanager/SConscript
===================================================================
--- branches/soc-2012-bratwurst/source/blender/windowmanager/SConscript	2012-07-07 23:38:40 UTC (rev 48717)
+++ branches/soc-2012-bratwurst/source/blender/windowmanager/SConscript	2012-07-08 00:00:51 UTC (rev 48718)
@@ -26,6 +26,12 @@
 if env['WITH_BF_COLLADA']:
     defs.append('WITH_COLLADA')
 
+if env['WITH_BF_ASSIMP']:
+    defs.append('WITH_ASSIMP')
+
+if env['WITH_BF_FBX']:
+    defs.append('WITH_FBX')
+
 if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'




More information about the Bf-blender-cvs mailing list