[Bf-blender-cvs] [21577a6] alembic_pointcache: Partial scons build files for pointcache library and Alembic dependencies.

Lukas Tönne noreply at git.blender.org
Tue Oct 21 20:32:21 CEST 2014


Commit: 21577a64f65c66f01456da187500d9b565f660e0
Author: Lukas Tönne
Date:   Tue Oct 21 20:31:15 2014 +0200
Branches: alembic_pointcache
https://developer.blender.org/rB21577a64f65c66f01456da187500d9b565f660e0

Partial scons build files for pointcache library and Alembic
dependencies.

This is not yet functional, the Alembic linking is quite tricky.

===================================================================

M	build_files/scons/config/linux-config.py
M	build_files/scons/tools/Blender.py
M	build_files/scons/tools/btools.py
M	source/blender/SConscript
M	source/blender/blenkernel/SConscript
M	source/blender/editors/physics/SConscript
M	source/blender/makesrna/SConscript
M	source/blender/makesrna/intern/SConscript
M	source/blender/modifiers/SConscript
A	source/blender/pointcache/SConscript

===================================================================

diff --git a/build_files/scons/config/linux-config.py b/build_files/scons/config/linux-config.py
index 05f09c2..8cbf3ec 100644
--- a/build_files/scons/config/linux-config.py
+++ b/build_files/scons/config/linux-config.py
@@ -226,6 +226,20 @@ BF_3DMOUSE_LIB_STATIC = '${BF_3DMOUSE_LIBPATH}/libspnav.a'
 #Freestyle
 WITH_BF_FREESTYLE = True
 
+# HDF5
+WITH_BF_HDF5 = True
+BF_HDF5 = '/usr'
+BF_HDF5_LIB = 'hdf5 hdf5_hl ${BF_OPENEXR}/lib/libHalf.a'
+BF_HDF5_LIBPATH='${BF_HDF5}/lib'
+
+# Alembic
+WITH_BF_ALEMBIC = True
+BF_ALEMBIC = '/opt/lib/alembic'
+BF_ALEMBIC_LIB = 'AlembicAbc AlembicAbcCollection AlembicAbcCoreFactory AlembicAbcCoreHDF5 AlembicAbcCoreAbstract AlembicAbcCoreOgawa AlembicAbcGeom AlembicAbcMaterial AlembicOgawa AlembicUtil ' + \
+    '${BF_HDF5}/lib/hdf5 ${BF_HDF5}/lib/hdf5_hl'
+BF_ALEMBIC_INC = '${BF_ALEMBIC}/include'
+BF_ALEMBIC_LIBPATH='${BF_ALEMBIC}/lib/static'
+
 ##
 CC = 'gcc'
 CXX = 'g++'
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index b5853b2..177d698 100755
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -204,10 +204,15 @@ def setup_staticlibs(lenv):
         libincs += Split(lenv['BF_OIIO_LIBPATH'])
         if lenv['WITH_BF_STATICOIIO']:
             statlibs += Split(lenv['BF_OIIO_LIB_STATIC'])
+
+    if lenv['WITH_BF_ALEMBIC']:
+        libincs += Split(lenv['BF_ALEMBIC_LIBPATH'])
+
     if lenv['WITH_BF_OPENEXR']:
         libincs += Split(lenv['BF_OPENEXR_LIBPATH'])
         if lenv['WITH_BF_STATICOPENEXR']:
             statlibs += Split(lenv['BF_OPENEXR_LIB_STATIC'])
+
     if lenv['WITH_BF_ZLIB'] and lenv['WITH_BF_STATICZLIB']:
         statlibs += Split(lenv['BF_ZLIB_LIB_STATIC'])
 
@@ -283,8 +288,12 @@ def setup_syslibs(lenv):
         if not lenv['WITH_BF_STATICOCIO']:
             syslibs += Split(lenv['BF_OCIO_LIB'])
 
+    if lenv['WITH_BF_ALEMBIC']:
+        syslibs += Split(lenv['BF_ALEMBIC_LIB'])
+
     if lenv['WITH_BF_OPENEXR'] and not lenv['WITH_BF_STATICOPENEXR']:
         syslibs += Split(lenv['BF_OPENEXR_LIB'])
+
     if lenv['WITH_BF_ZLIB'] and not lenv['WITH_BF_STATICZLIB']:
         syslibs += Split(lenv['BF_ZLIB_LIB'])
     if lenv['WITH_BF_TIFF'] and not lenv['WITH_BF_STATICTIFF']:
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index 12cbbb1..36be4a9 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -575,6 +575,17 @@ def read_opts(env, cfg, args):
         (BoolVariable('WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS', 'Enable fixed-size schur specializations', True)),
 
         (BoolVariable('WITH_BF_COMPOSITOR', 'Enable the tile based nodal compositor', True)),
+
+        (BoolVariable('WITH_BF_HDF5', 'Use HDF5 if true', False)),
+        ('BF_HDF5', 'HDF5 base path', ''),
+        ('BF_HDF5_LIB', 'HDF5 library', ''),
+        ('BF_HDF5_LIBPATH', 'HDF5 library path', ''),
+
+        (BoolVariable('WITH_BF_ALEMBIC', 'Use Alembic if true', False)),
+        ('BF_ALEMBIC', 'Alembic base path', ''),
+        ('BF_ALEMBIC_INC', 'Alembic include path', ''),
+        ('BF_ALEMBIC_LIB', 'Alembic library', ''),
+        ('BF_ALEMBIC_LIBPATH', 'Alembic library path', ''),
     ) # end of opts.AddOptions()
 
     localopts.AddVariables(
diff --git a/source/blender/SConscript b/source/blender/SConscript
index de052f2..34de8a1 100644
--- a/source/blender/SConscript
+++ b/source/blender/SConscript
@@ -42,7 +42,8 @@ SConscript(['avi/SConscript',
             'modifiers/SConscript',
             'ikplugin/SConscript',
             'windowmanager/SConscript',
-            'blenfont/SConscript'])
+            'blenfont/SConscript',
+            'pointcache/SConscript'])
 
 makesrna = SConscript('makesrna/SConscript')
 
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index 9243c85..e01d73c 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -64,6 +64,7 @@ incs = [
     '../makesrna',
     '../modifiers',
     '../nodes',
+    '../pointcache',
     '../render/extern/include',
     '../windowmanager',
     env['BF_ZLIB_INC'],
diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript
index 983d1c4..aa0bb26 100644
--- a/source/blender/editors/physics/SConscript
+++ b/source/blender/editors/physics/SConscript
@@ -36,6 +36,7 @@ incs = [
     '#/intern/rigidbody',
     '#/intern/elbeem/extern',
     '../include',
+    '../../pointcache',
     '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 4e7a564..c5327f3 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -53,6 +53,7 @@ incs = [
     '../imbuf',
     '../makesdna',
     '../nodes',
+    '../pointcache',
     '../render/extern/include',
     '../windowmanager',
     ]
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index d1eab5c..30b7e41 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -72,6 +72,7 @@ incs = [
     '../../imbuf',
     '../../makesdna',
     '../../makesrna',
+    '../../pointcache',
     '../../render/extern/include',
     '../../windowmanager',
     ]
diff --git a/source/blender/modifiers/SConscript b/source/blender/modifiers/SConscript
index c15a562..302c517 100644
--- a/source/blender/modifiers/SConscript
+++ b/source/blender/modifiers/SConscript
@@ -44,6 +44,7 @@ incs = [
     '../makesrna',
     '../blenkernel',
     '../gpu',
+    '../pointcache',
     env['BF_ZLIB_INC'],
     ]
 
diff --git a/source/blender/editors/physics/SConscript b/source/blender/pointcache/SConscript
similarity index 62%
copy from source/blender/editors/physics/SConscript
copy to source/blender/pointcache/SConscript
index 983d1c4..5da7209 100644
--- a/source/blender/editors/physics/SConscript
+++ b/source/blender/pointcache/SConscript
@@ -16,42 +16,43 @@
 # 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
+# The Original Code is Copyright (C) 2014, Blender Foundation
 # All rights reserved.
 #
 # The Original Code is: all of this file.
 #
-# Contributor(s): Nathan Letwory.
+# Contributor(s): Lukas Toenne.
 #
 # ***** END GPL LICENSE BLOCK *****
 
 Import ('env')
 
-sources = env.Glob('*.c')
+sources = env.Glob('intern/*.cpp') + env.Glob('util/*.cpp') + env.Glob('*.cpp')
 
 incs = [
-    '#/intern/guardedalloc',
-    env['BF_GLEW_INC'],
-    '#/intern/glew-mx',
-    '#/intern/rigidbody',
-    '#/intern/elbeem/extern',
-    '../include',
-    '../../blenfont',
-    '../../blenkernel',
-    '../../blenlib',
-    '../../gpu',
-    '../../makesdna',
-    '../../makesrna',
-    '../../windowmanager',
+    '.',
+    'intern',
+    'util',
+    '../blenkernel',
+    '../blenlib',
+    '../makesdna',
+    '../makesrna',
+    '../../../intern/guardedalloc',
+    '/opt/lib/openexr/include/OpenEXR'
     ]
-incs = ' '.join(incs)
 
-defs = env['BF_GL_DEFINITIONS']
-
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
-    incs += ' ' + env['BF_PTHREADS_INC']
+defs = []
 
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
 
-env.BlenderLib ( 'bf_editors_physics', sources, Split(incs), defs, libtype=['core'], priority=[45] )
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
+    incs.append(env['BF_PTHREADS_INC'])
+
+if env['WITH_BF_ALEMBIC']:
+    incs.append(env['BF_OPENEXR_INC'])
+    incs.append(env['BF_ALEMBIC_INC'])
+
+    defs.append('WITH_ALEMBIC')
+
+env.BlenderLib('bf_pointcache', sources, incs, defines=defs, libtype=['core'], priority=[900])




More information about the Bf-blender-cvs mailing list